System Information using the console
There are some really useful commands that can give information about the system directly from the console. Some of them are:
See a list of all the running processes using standard syntax:
# ps ax | less
See a list of all the running processes using BSD syntax:
# ps aux | less
See real-time information about running processes:
# top
Pressing the L, T, M keys while top is running you can toggle the display of Average Load, CPU and Memory usage respectively. The Space key refreshes the display and Q key quits the program. There are a lot more, so you should check the man page.
Memory and SWAP space usage:
# free -m
Use the -m parameter to show the amount of memory in MB instead of bytes.
Check if a program is running:
# ps ax | grep PROGRAM | grep -v grep
Show filesystem and disk space usage:
# df -h
Show disk usage under the current directory
# du -hs
The -h parameter shows sizes in human readable formats (eg MB, GB) and the -s gives only a total. If it’s not used, then information about each subdirectory is shown.
There are a lot more. I’ll add more commands to this post in a future update. Stay tuned!
Related Articles
- Change the console resolution
- Epiphany Python Console – Open New Tab
- Change console font in Fedora
- Making a directory writable by the webserver
- Search for a string in multiple files
Tags: Administration, Audit, Shell, System, Tips