CompTIA XK0-005 Practice Test - Questions Answers, Page 35
List of questions
Related questions
Which of the following options describes the purpose of YAML?
YAML is a binary format used to ensure data transfer in a non-human-readable format
YAML is used for configuration files and data serialization in IaC tools in a human-readable format
YAML is like HTML and is used to create web page structure content for web deployment
YAML is designed for web development and has libraries for infrastructure automation
Users are reporting that a production application has slow performance. A systems administrator logs in to the server and performs some basic checks. Given the following:
yaml
[root@comptia]# ps -o pcpu; pidstat 1
Average: UID PID %usr %system %wait %CPU Command
Average: 0 937242 32.39 0 63.21 32.39 app_prd
Average: 0 937245 44.97 0.31 51.57 45.28 app_prd
Average: 0 937244 23.62 0 63.55 28.62 app_prd
[root@comptia]# vmstat 1
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy id wa st
16 0 978912 376320 50804 10296312 0 0 0 44 5503 2962 98 2 0 0 0
[root@comptia]# free -m
total used free shared buff/cache available
Mem: 15533 5063 365 164 10104 9975
Swap: 7931 955 6976
Which of the following is causing the performance issue?
The server does not have enough memory
Too many processes are running on the server
The server CPU is receiving too much load
The server is swapping
The development team created a new branch with code changes that a Linux administrator needs to pull from the remote repository. When the administrator looks for the branch in Git, the branch in question is not visible. Which of the following commands should the Linux administrator run to refresh the branch information?
git fetch
git checkout
git clone
git branch
After connecting to a remote host via SSH, an administrator attempts to run an application but receives the following error:
arduino
Error: cannot open display:
Which of the following should the administrator do to resolve this error?
Disconnect from the SSH session and reconnect using the ssh -X command
Add Options X11 to the /home/admin/.ssh/authorized_keys file
Open port 6000 on the workstation and restart the firewalld service
Enable X11 forwarding in /etc/ssh/ssh_config and restart the server
A systems administrator needs to know the mail exchange (MX) record for the foo.com domain. Which of the following commands will accomplish this task?
telnet mx foo.com
dig mx foo.com
nslookup mx foo.com
host mx foo.com
Which of the following commands should a technician use to create an administrative account for the username Joe?
sudo useradd -G wheel joe
sudo useradd joe; sudo passwd -l joe
sudo useradd joe; sudo cat key.pem > ~/.ssh/authorized_keys
sudo useradd joe; groupadd admin joe
A Linux administrator needs to forward port 8000 on a remote server to port 8000 on a local server. Which of the following commands should the administrator run on the local server to achieve this goal?
firewall-cmd --add-forward-port=port=8000 =tcp =8000 =remote
iptables -A FORWARD -m state -p tcp -d remote --dport 9000 -j accept
ssh -R 8000:localhost:9000 remote
socat TCP4-LISTEN:8000,fork TCP4:remote:8000
A systems administrator created a user cron to run a scheduled database backup cronjob on the server at 1 a.m. every day. The following is the cronjob syntax:
0 1 * * * /bin/sh backup.sh
The backups, however, are not being created. When checking the crontab file, the administrator sees the following error:
/var/spool/cron/crontab/cron: Permission denied
Which of the following will permit the cronjob to execute?
Creating the file cron.allow and adding user cron to it
Giving cron ownership of the file /usr/bin/crontab
Running sudo cron restart to activate the cronjob
Running sudo crontab -u cron -e to edit the file with sudo
A Linux administrator deployed a large-scale application service as a containerized pod. The Linux administrator needs to continually send the application's log file to the company's central log store. Which of the following should the Linux administrator do to efficiently perform this task?
Configure a sidecar to perform log shipping
Run docker exec to access the logs within the container
Execute docker inspect and run a log rsync replication
Set up a custom task scheduler via kubectl
A Linux administrator needs to run a web application on a server that requires the use of a desktop web browser to enter the final configuration information. The administrator determines the server is running in multi-user mode. The administrator verifies that a web browser is installed on the server and that it has a display manager installed. Which of the following commands will best allow the administrator to temporarily use the web browser on the server?
sudo systemctl isolate graphical.target
sudo systemctl set-default runlevel5.target
sudo systemctl restart gdm
sudo systemctl --no-wall rescue
Question