Archive

Posts Tagged ‘command line’

Monitoring top 10 Linux CPU consuming processes

I always need to check the processes that are consuming CPU at my machine, using ps its easy. With the following command, you can write a script and then send email, take action, etc.

ps aux –sort=-pcpu | head -n 10

You can play with TOP also, but I prefer PS for this case.

top -b -c -n 1 | head -n 17 | tail -n 10

Enjoy!

Categorias:AIX, Linux Tags:, , , , ,

Discovering Red Hat version using command line

If you need to check your Red Hat version from command line, here is 2 simple ways:

[root@dstvm601g10 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)

or

[root@dstvm601g10 ~]# lsb_release -rd
Description:    Red Hat Enterprise Linux Server release 6.7 (Santiago)
Release:    6.7

I always need this, and always forget!

Enjoy!

Categorias:Linux Tags:, , ,