Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

Noob question about server load

Noob question about server load

jhadleyjhadley Member
edited September 2012 in Help

All of the Linux utilities I know of work with 1, 5 and 15 minute load averages, but I am working on something that could benefit from having a shorter load average, or even reading the load number rather than an average. Is this possible?

A LowEnd* user walks into a bar and asks for a drink. While the bartender pours the drink, the user opens 8 tickets. When the drink is ready, the user opens a 9th ticket demanding to know why the drink isn't free.

Tagged:

Comments

  • You are looking for something to monitor the load in real time?

    Disclosure: I work for Query Foundry LLC.
    I own DA International Group Ltd.
  • Yes

    A LowEnd* user walks into a bar and asks for a drink. While the bartender pours the drink, the user opens 8 tickets. When the drink is ready, the user opens a 9th ticket demanding to know why the drink isn't free.

  • Doesent top monitor in real time?

    Disclosure: I work for Query Foundry LLC.
    I own DA International Group Ltd.
  • @Alex_LiquidHost said: Doesent top monitor in real time?

    No, top gives averages over 1, 5 and 15 minutes.

    A LowEnd* user walks into a bar and asks for a drink. While the bartender pours the drink, the user opens 8 tickets. When the drink is ready, the user opens a 9th ticket demanding to know why the drink isn't free.

  • Might be, I am not sure. However isn't this the load at the current time: http://i.imgur.com/XmqId.png

    And the load average at the top for 1, 5, 15 mins?

    Disclosure: I work for Query Foundry LLC.
    I own DA International Group Ltd.
  • uptime calls getloadavg (avg, 3);

    However, that function can only maximum return 3 (being 1,5 and 15). You could probably make your own formula to get the CPU usage, IO usage and memory usage and output a result yourself however.

    The Original Daniel.

    Thanked by 1klikli
  • @Alex_LiquidHost said: However isn't this the load at the current time: http://i.imgur.com/XmqId.png

    No, that's only CPU usage, which is just one component of the load.

    A LowEnd* user walks into a bar and asks for a drink. While the bartender pours the drink, the user opens 8 tickets. When the drink is ready, the user opens a 9th ticket demanding to know why the drink isn't free.

  • The only potentially useful thing I found. http://stackoverflow.com/questions/8879370/reading-a-shorter-than-1-minute-load-average-on-a-linux-system

    The other suggestion was hacking at the kernel.

    Thanked by 1klikli
  • No easier way at all?

    A LowEnd* user walks into a bar and asks for a drink. While the bartender pours the drink, the user opens 8 tickets. When the drink is ready, the user opens a 9th ticket demanding to know why the drink isn't free.

  • what do you expect from average?

    Yes! I'm with Carstensz Pyramid Server Now stop asking me please :D
  • gsrdgrdghdgsrdgrdghd Member
    edited September 2012

    @Mon5t3r said: what do you expect from average?

    uptime returns the average over 1, 5 and 15 minutes, i guess @jhadley also wants the average over e.g. 10 seconds or so.

    Thanked by 1Mon5t3r
  • What other component of the load? :o

  • @gsrdgrdghd said: uptime returns the average over 1, 5 and 15 minutes, i guess jhadley also wants the average over e.g. 10 seconds or so.

    sorry that comment should be in number 3, below jhadley's "yes" comment.. i forgot hitting post comment button hahaha

    @jhadley well maybe /proc/uptime can help you out. also take a look on this site

    Yes! I'm with Carstensz Pyramid Server Now stop asking me please :D
  • The load average is a rolling average of the the number of processes in the run queue divided by the number of processing cores. The first column of vmstat's output is the run queue length. So you could use vmstat|tail -1|cut -d" " -f2 to get a point-in-time snapshot of the run queue, then divide it by the number of cores. If you're consistently getting a number higher than the number of cores you have, that would probably indicate a problem.

    Thanked by 1Zen
  • @NickM said: The load average is a rolling average of the the number of processes in the run queue divided by the number of processing cores.

    It is not divided by the number of processing cores/threads, which is why this number should be taken into account whenever looking at a load average.

  • @NickW is correct. Sorry for the confusion.

  • how about vpsinfo?

    My blog | Server Uptime | I'm not working for any providers in here, all my comments just my own opinion.
Sign In or Register to comment.