Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have written a script that triggers a mail if the server load average goes beyond a specific value.
The mail contains following field
Current Load average.
Top 10 CPU utilized processes.
Code:
ps -auxf | sort -nr -k 3 | head -10
Top 10 Memory Utilized processes.
Code:
ps -auxf | sort -nr -k 4 | head -10
But the problem is that whenever there is any disk related activity happens the load gets high and the command (for ex.mkfs.ext3 /dev/sdb1, dd,scp,cp)which are the main cause behind the load average doesnt get displayed in top 10 CPU/Memory Utilized processes.
Is there any way of finding top 10 processes for Disk related activity?
iotop Taskstats requires taskstats to be:
a) available in the kernel, and
b) enabled.
If the distro doesn't ship iostats, it's likely they don't (yet) have a kernel that supports it. Try a later release of the distro.
I have grave concerns about using loadavg as a trigger like this in Linux. It's quite common to see high loadavg with little or no CPU usage and little (or no) I/O.
But, it's Linux - the choice is yours.
iotop Taskstats requires taskstats to be:
a) available in the kernel, and
b) enabled.
If the distro doesn't ship iostats, it's likely they don't (yet) have a kernel that supports it. Try a later release of the distro.
I have grave concerns about using loadavg as a trigger like this in Linux. It's quite common to see high loadavg with little or no CPU usage and little (or no) I/O.
But, it's Linux - the choice is yours.
I would like to hear what causes the High Loadavg if its not CPU or I/O?
iotop works great.
It was not installed by default, but I used yum to get it and I love it.
@pinga123: which distro do you use, and doesn't it have iotop in its repository?
I checked the repository but no package starting from iotop* found.
Code:
# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Release: 5.2
Codename: Carthage
Tried downloading and installing iotop from external sources but the iotop seems to be made for Linux >= 2.6.20
Code:
# rpm -ivh python-ctypes-1.0.2-2.el5.i386.rpm
warning: python-ctypes-1.0.2-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
1:python-ctypes ########################################### [100%]
# rpm -ivh iotop-0.4.1-2.el5.noarch.rpm
warning: iotop-0.4.1-2.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
1:iotop ########################################### [100%]
# iotop
Could not run iotop as some of the requirements are not met:
- Linux >= 2.6.20 with
- I/O accounting support (CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING)
# uname -r
2.6.18-92.el5
is iotop and iostat does the same? I dont have iostat too is there easier way to enable it?
edited:
Enabled iostat by installing sysstat package.
Does iostat tells which process is causing high io utilization. by simply giving iostat results in total read/write on every disk.
I am guessing you are using redhat 5.2 from your kernel name.
I did a bit of googling, andhere is what I found:
The EPEL repository could be what you need to get the iotop rpm: http://www.cyberciti.biz/faq/rhel-fe...ble-epel-repo/
I am guessing you are using redhat 5.2 from your kernel name.
I did a bit of googling, andhere is what I found:
The EPEL repository could be what you need to get the iotop rpm: http://www.cyberciti.biz/faq/rhel-fe...ble-epel-repo/
Installed iotop from the link you mentioned but now i m confused on how to fulfill its requirement Do i need to change the Kernel parameter as mentioned in below output? How?.
Code:
# iotop
Could not run iotop as some of the requirements are not met:
- Linux >= 2.6.20 with
- I/O accounting support (CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING)
(just noticed this thread again).
As I stated above, you must be on a kernel that has taskstats support. At 2.6.18, no (userspace) tool can provide the data as it doesn't exist.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.