Soooo do I leave it at approx 6 and watch the intermittant spikes come and go? Do I got for 8 or more after it exceeds an effective load
average of one, or do I place it perhaps as high as 10-15 and just catch the really weird stuff that is still occasionally getting installed?
I've presently set it for greater than 7, but thoughts would be appreciated.
I think it's all about personal preference: how much email do you
want to receive?
I think it's all about personal preference: how much email do you want to receive?
As it turns out not a lot, and want it to be somewhat meaningful, having let it run overnight, I find I have some 36 instances of > 7 and the
peak was 9.x sooo I think I'm going to set it to > 10 and see what happens.
Whatever peaks the load, seems to happen about once an hour at the half hour, not always consistent though. It generally seems to reach 8 with
the odd 9.x thrown in there.
So you might consider making your script email you the output of `top`
So you might consider making your script email you the output of `top
You're going to make me read the man page aren't you....I've only ever used top in an interactive fashion :)
I've presently set it for greater than 7, but thoughts would be appreciated.
I think it's all about personal preference: how much email do you
want to receive?
So you might consider making your script email you the output of `top
You're going to make me read the man page aren't you....I've
only ever used top in an interactive fashion :)
Heh. Actually, on Linux, `top` may not be what you want. It appears
to ONLY support an interactive mode (complete with all the
Heh. Actually, on Linux, `top` may not be what you want. It appears to ONLY support an interactive mode (complete with all the
And the winner is... top -b -n1 for just 1 iteration.. :)
Heh. Actually, on Linux, `top` may not be what you want. It appears to ONLY support an interactive mode (complete with all the terminal-handling
And the winner is... top -b -n1 for just 1 iteration.. :)
Spec
You could use 'top -b -n1', it may not be supported on all platforms but most Linux distro should allow it.
I should start reading backwards :)
So you might consider making your script email you the output of
`top
You're going to make me read the man page aren't you....I've
only ever used top in an interactive fashion :)
Heh. Actually, on Linux, `top` may not be what you want. It
appears to ONLY support an interactive mode (complete with all
the
And the winner is... top -b -n1 for just 1 iteration.. :)
Spec
--- SuperBBS v1.17-3 (Eval)
* Origin: < Scrawled in blood at The Lower Planes > (21:3/101)
ps axo pid,%cpu,cmd --sort=%cpu | tail -5 | tac
You could use `ps` like this;
ps axo pid,%cpu,cmd --sort=%cpu | tail -5 | tac
What does this do?
"ps axo pid,%cpu,cmd --sort=%cpu" just lists all running processes displaying just the PID, the %CPU usage and the command itself
"| tail -5" takes the output of the above and shows just the last 5
lines of it - anything more would likely be too much...
"| tac" takes the output of the above and reverses it.
This will produce a list of the top 5 processes using the cpu, with the highest at the top in a descending order.
So I've been using unix for a looooong time - and every now and again, I learn of a new command - "tac", never knew about that one... :)
...deon
Using `tac` is a clever trick, but if you prepend a '-' to the sort character, it'll reverse the sort order so that processes are listed
in descending order. Then you can use `head` (or the more authentic
`sed 10q` and also have the header).
Today I am learning how to build a new node in an OpenNebula cluster.
Lots of fun and learning. =)
This is true, but I wanted it without the header so leaving it ascending and then grab the last 5 and then reversing them saved a whole bunch
of sed/awk/jiggery-pokery imo.
I've heard of OpenNebula - not exactly sure what it does. I know of it because I get spam every now and again.
I'm playing with ansible and OpenShift... My goal is to deploy VMs with ansible, and then automate the install of Openshift in those VMs. (I
want to automate it, so when it expires in 60 days, I can rebuild it...)
Hopefully achieving above I'll learn more about both products...
...deon
Chuckle, if you take them in the correct order from the start, you can just feed it through tail. The length of the top output is fixed, just tail 20 I think it is off hand and you've got all the results. I
actually ended up using tail to remove the header, and then head to
limit the result to top 10 :)
Nice, yeah my method isn't necessarily elegant or the most efficient
but it did what I needed it to. I love learning how other people
approach the same problems and see how they overcome them.
The most important part is it works :) 98% functionality, 2% anything else
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 31 |
Nodes: | 8 (0 / 8) |
Uptime: | 154:23:37 |
Calls: | 2,074 |
Files: | 11,137 |
Messages: | 946,947 |