Skip to content

How can I monitor what is going on with my Linux system?

You may have to install this tool called dstat, but then run:

dstat -tcndylp –top-cpu

This will list a snapshot of system behavior every second which can tell you if your CPUs are pegged, memory usage is maxed, or if IO is getting hammered. All very important for understanding why a system might be behaving strangely.

You can also use the following when you run you program to cross-correlate STDOUT messages to resource utilization to:

my_program -arg 123 | awk ‘{ print strftime(“%Y-%m-%d %H:%M:%S”), $0; fflush(); }’

TheSoftwareProgrammer View All

I like science and writing software.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: