Linux/System Monitoring
From charlesreid1
System Monitoring
What system monitoring entails:
- inspect and manage processes
- understand load average
- available memory
- checking stuff from a shell
- disk space, storage available
- logging
- log size, log rotate
- systemd init system
- systemd journal
Controlling Processes
In order to control a process, you must be able to find a process.
Use the ps command to list currently running processes, and pass the aux argument to show everything:
$ ps aux
This shows a lot of information. Filter it out with grep:
$ ps aux | grep httpd
This is also useful because it will display information about the cpu and memory usage.
Now you can see its PID, and use that to kill the process:
$ kill 15800
THis will send a SIGTERM, or Signal 15, to the process. There are 18 different signals you can send, the SIGTERM is the nice polite request that the process stop.
$ man 7 signal
If you want to send a different signal, like 12, or 2,
$ kill -12 15800 $ kill -2 15800
or if you are desparate, send a SIGKILL, Signal 9:
$ kill -9 15800
If you don't know the PID but you do know the process name, you can use the killall command:
$ killall firefox
Related
| linux networking all the pages for linux networking
Diagnosing network interfaces: Linux/Network Interfaces Connecting to nodes with ssh: Linux/SSH Bridging networks with ssh tunnels: Linux/SSH Linux file server nfs/smb/sshfs: Linux/File Server Samba on linux: Linux/Samba Automounting network shares on linux: Linux/Automount Network Shares Monitoring system resources: Linux/System Monitoring Linux systemd: Linux/Systemd
IP Schema (ipcalc): Linux/IP Schema DHCP Server: Linux/DHCP DNS Server: Linux/DNS NTP Server: Linux/NTP
|