Sys Admin Flashcards

1
Q

What command would you use to check memory performance?

A

vmstat

vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.

The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case.

Or use memstat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the man command used for?

A

It displays information about the syntax for a command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What tools are used to measure disk I/O?

A

vmstat - Report virtual memory statistics.
memstat -
iostat - Report CPU statistics and i/o statistics for devices, partitions and network filesystems (NFS).
sar - Collect, report, or save system activity information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Where is the httpd.conf file located?

A

/etc/httpd/conf/httpd.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How would you restart the https service?

A

/usr/sbin/apachectl restart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If the httpd service having issues restarting, where would you look for more information?

A

/var/log/httpd/error_log

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What log would you look in to find issues that may have happened during the boot process?

A

/var/log/dmesg
/var/log/boot.log
/var/log/messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can you find which ports are listening on a server, both locally and remotely?

A

Locally:
netstat –listen
netstat -tuplan
lsof -i (list open files)

Remotely:
nmap
netcat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the chroot command?

A

chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name (and therefore normally not access) files outside the designated directory tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where are default system / service config files located?

A

/etc/sysconfig/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How would you restart the httpd service?

A

/usr/sbin/apachectl restart

service httpd restart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What default port does HTTPS listen on?

A

443

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What would occur if the system were booted into run level 3 and the command “init 1” was executed from the command-line?

A

As root, that would put the system into single user mode without a reboot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between run level 3 and run level 5?

A

run level 3 is the default multiuser run level, run level 5 is for X11 or graphical/desktop.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the significance of the init process?

A

init - short for initialisation is a daemon process that is the direct or indirect ancestor of all other processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What commands are used to modify file permissions?

A

chmod - change file mode bits

chown - change file owner and group

17
Q

Assuming a shell script, script.sh, has executable permissions, how can you run that script?

A

If in path, then script.sh if not then /script.sh or if in current directory ./script.sh
If not executable then . ./script.sh

18
Q

What default port does FTP listen on?

A

21

19
Q

What default port does ssh listen on?

A

22

20
Q

What default port does MySQL listen on?

A

3306

21
Q

What default port does IMAP listen on?

A

143

22
Q

What default port does pop3 listen on?

A

110

23
Q

What default port does SMTP listen on?

A

25

24
Q

What default port does HTTP listen on?

A

80

25
Q

Can you run out of inodes while still having plenty of available disk space on the file system?

A

Trick question…

Some file system such as ext3 create all the inodes when the file system is created. Thus it is possible to run out of storage because all of the inodes are used yet the storage still has unused capacity. To help get around this other file systems such as ext4 and xfs, create inodes as needed.

26
Q

What is the purpose of the fstab file?

A

File system table The fstab (/etc/fstab) (or file systems table) file is a system configuration file commonly found on Unix systems. It is part of the util-linux package. The fstab file typically lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise integrated into the overall system’s file system.

27
Q

What is an inode?

A

Each inode (index node) stores all the information about a file system object (file, directory, device node, socket, pipe, etc.), except data content and file name

28
Q

What would the command “mount –a” do?

A

(usually given in a bootscript) causes all file systems mentioned in fstab (of the proper type and/or having or not having the proper options) to be mounted as indicated, except for those whose line contains the noauto keyword.

29
Q

What log would you look in to find issues that may have happened during the boot process?

A

/var/log/dmesg
/var/log/boot.log
/var/log/messages

30
Q

What commands can be used to display one page of output at a time to the screen?

A

more or less

31
Q

What command can be used to decompress the file foo.gz?

A

gunzip foo.gz

32
Q

What default port does SNMP listen on?

A

161

162 for SNMP traps