LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-23-2007, 05:18 AM   #1
viky
LQ Newbie
 
Registered: Jul 2007
Posts: 14

Rep: Reputation: 0
Generate alert with "CPU load average" "CPU utilization"


Hi,

I must write a trigger to generate an alert with these three variables:

1)CPU load average
2)CPU utilization user
3)CPU utilization system

But I don't know what's relationship between these three variables

Could someone help me?
 
Old 07-23-2007, 06:27 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Do you mean what each one represents?

1. CPU load average is the average utilization over time. Unix usually displays this with three time periods to increase accuracy. This combines both user and system CPU loads.

2. User CPU utilization is how much of the CPU's power is being taken up by tasks running by the actual users.

3. System utilization is made up of the tasks being run by the operating system. These are the "behind the scenes" type processes, which the user generally is not in direct control of.
 
Old 07-23-2007, 07:34 AM   #3
viky
LQ Newbie
 
Registered: Jul 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Sorry, I was not clear.

I search an algorithm or Function that send an alert when it receives those variables... some like a script...
 
Old 07-25-2007, 04:24 AM   #4
viky
LQ Newbie
 
Registered: Jul 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Post Pseudo-code

If (Cpu load=High) {[INDENT]Switch (Cpu user) {[INDENT]
case High: Alarm
case Medium: Warning
case Low: {
Switch (Cpu sys) {
case High: Allarm
case Medium: Warning
case Low: Allarm
}
}
}
}
Else {
if (Cpu sys=Medum or Cpu sys=High) {
Warning
} Else {
if (Cpu user=High) {
Warning
} Else {
OK
}
}
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alert used "cpu load" and "cpu utilization" viky General 0 07-23-2007 03:19 AM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM
"us" CPU usage in "TOP" bastupungen Linux - Server 6 11-04-2006 07:02 AM
how to get "load average" using a program t_sunil_kumar Programming 2 06-08-2004 10:51 AM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 01:42 AM


All times are GMT -5. The time now is 04:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration