Super: http://www.howtoforge.de/howto/bashbefehle-und-programme-um-traffic-und-auslastung-zu-prufen/

Quelle1)

Get CPU / System Load Average on Ubuntu Linux

Ubuntu linux has a rich set of commands for getting system info. One of the useful pieces of information that a system administrator might need is to know what the overall system load on a server is.

There are a couple of ways to get this information, which may or may not be enabled on your system. It’s useful to know more than one way to get the uptime information in case the commands are disabled on your shared hosting server.

uptime

The uptime command gives information on system load averages for the past 1, 5, and 15 minutes: Example:

[root@ubuntu geek]# uptime
05:59:07 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39

w

The w command shows who is logged on and what they are doing, including system load averages for the past 1, 5, and 15 minutes.

[root@ubuntu geek]# uptime
05:59:56 up 87 days, 13:13, 1 user, load average: 0.00, 0.00, 0.39
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
geek pts/0 192.168.1.115 6:31pm 0.00s 0.62s 0.03s /usr/sbin/sshd 

/proc/loadavg

The /proc/loadavg file contains information on the system load. Most likely the uptime/w commands utilize this information. The first 3 values contain system load averages for the past 1, 5, and 15 minutes.

[root@ubuntu geek]# cat /proc/loadavg
0.00 0.00 0.39 1/49 15352

There are probably some more commands, but these are the ones off the top of my head that I know of.

List processes ordered by cpu-usage

 ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d' 

List processes by % cpu usage

 
Nach oben
get_cpu_system_load_average_on_linux.txt · Zuletzt geändert: 2024/02/29 13:36 von 127.0.0.1
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0
DFmW2CEce3htPL1uNQuHUVu4Tk6WXigFQp   Dogecoin Donations Accepted Here    DFmW2CEce3htPL1uNQuHUVu4Tk6WXigFQp  DFmW2CEce3htPL1uNQuHUVu4Tk6WXigFQp