The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Watching users..

Discussion in 'General Discussion' started by teck, Feb 16, 2002.

  1. teck

    teck Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Sometimes my load goes to 1 or 2. Is it possible to tell what sites are causing this? For example, what commands does everyone use to see who's using more resources than the others?

    I've tried top and ps aux but those only show the system process that is using up memory/cpu.

    /scripts/userps shows a number but i'm unsure what that number represents. Sometimes, nothing even shows there and the time it does show, only one site has a number even though I know there are other popular sites.

    Is there a good way to tell what sites are hammering apache/mysql?
     
  2. ZachICU

    ZachICU Well-Known Member

    Joined:
    Aug 11, 2001
    Messages:
    130
    Likes Received:
    0
    Trophy Points:
    16
    I am also curious about this.

    Then a way to pull the IP of someone who is hammering apache.

    THanks
    Zach
     
  3. dzevad

    dzevad Well-Known Member

    Joined:
    Oct 7, 2001
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    I use top command
     
  4. teck

    teck Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    That doesn't tell you much except what process is out of control.
     
  5. dzevad

    dzevad Well-Known Member

    Joined:
    Oct 7, 2001
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    But it tells you user id
     
  6. bdraco

    bdraco Guest

    [quote:ec8046ad06][i:ec8046ad06]Originally posted by ZachICU[/i:ec8046ad06]

    I am also curious about this.

    Then a way to pull the IP of someone who is hammering apache.

    THanks
    Zach[/quote:ec8046ad06]


    netstat -an |grep &:80 &
     
  7. teck

    teck Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    [quote:991feb83de][i:991feb83de]Originally posted by dzevad[/i:991feb83de]

    But it tells you user id[/quote:991feb83de]

    Not really.. It does if theres a CGI or something that a user is running but lets say mysql is getting hammered. All it shows is the mysql process soaring.. doesn't really say which user is causing this.

    Nick, thanks for that command but it seems useless for name based sites since they're all going to be the same ip :(

    Maybe you can come up with a script that can fix this problem with name based sites or at least, include something in WHM that will get the output of that command, get the IP, find the associated domain name with that IP and spit it back into a pretty little form saying how much of that site is getting hammered.
     
  8. Brad

    Brad Well-Known Member

    Joined:
    Aug 16, 2001
    Messages:
    231
    Likes Received:
    0
    Trophy Points:
    16
    I'd like to have this one too..


    Nice idea.


    [quote:f536ea0876][i:f536ea0876]Originally posted by teck[/i:f536ea0876]

    [quote:f536ea0876][i:f536ea0876]Originally posted by dzevad[/i:f536ea0876]

    But it tells you user id[/quote:f536ea0876]

    Not really.. It does if theres a CGI or something that a user is running but lets say mysql is getting hammered. All it shows is the mysql process soaring.. doesn't really say which user is causing this.

    Nick, thanks for that command but it seems useless for name based sites since they're all going to be the same ip :(

    Maybe you can come up with a script that can fix this problem with name based sites or at least, include something in WHM that will get the output of that command, get the IP, find the associated domain name with that IP and spit it back into a pretty little form saying how much of that site is getting hammered.[/quote:f536ea0876]
     
  9. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    Seems I have seen some hunk of junk control panel somewhere on the net in the last 6 months or so that had a spot on each users page for resources / CPU % useage for an average for a month just like storage and bandwidth. I remember that I hated the rest of the control panel but that feature got my attention .Can this be done? How whould you track that sort of thing by user anyway?
     
  10. Elena

    Elena Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    California
    I know what control panel you are talking about.. but I won't post it here since I don't think that's appropriate. I will show an example of what they have there (these are just like the collumn headers of what is shown in the table of users on the server):

    Domain Name -- CPU Usage (%) -- Virtual Memory (MB) -- Resident Memory (MB) -- Total Processes -- Logged users
     
  11. teck

    teck Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    That would be awesome.
     
  12. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    [quote:9dd6904259][i:9dd6904259]Originally posted by Elena[/i:9dd6904259]

    I know what control panel you are talking about.. but I won't post it here since I don't think that's appropriate. I will show an example of what they have there (these are just like the collumn headers of what is shown in the table of users on the server):

    Domain Name -- CPU Usage (%) -- Virtual Memory (MB) -- Resident Memory (MB) -- Total Processes -- Logged users[/quote:9dd6904259]

    That's the one nut I can't remember anything else about it :(
     
  13. awsol

    awsol cPanel Test Bitch

    Joined:
    Feb 8, 2002
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Boston MA
    I'd like this too. I charge people for over usage and stuff and this would help me big time.
     
  14. Domenico

    Domenico Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    362
    Likes Received:
    0
    Trophy Points:
    16
    What do you guys mean with watching users?

    See what users are doing in realtime?
     
  15. AlaskanWolf

    AlaskanWolf Well-Known Member

    Joined:
    Aug 11, 2001
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Fremont CA
    its a great idea, something cpanel really needs

    watch users as in = watch system resources for users abusing...httpd...mysql...etc....
     
  16. gorgo

    gorgo Well-Known Member

    Joined:
    Jan 9, 2002
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    16
    I would like the ability for WHM to automatically suspend an accounts if they reach a treshhold level.

    Lets say if a user goes over 10% CPU time, or 15% Memory, they automatically get suspended...


    Thanks
     
  17. Domenico

    Domenico Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    362
    Likes Received:
    0
    Trophy Points:
    16
    [quote:5b4b452f2e][i:5b4b452f2e]Originally posted by gorgo[/i:5b4b452f2e]

    I would like the ability for WHM to automatically suspend an accounts if they reach a treshhold level.

    Lets say if a user goes over 10% CPU time, or 15% Memory, they automatically get suspended...


    Thanks[/quote:5b4b452f2e]

    Hmm, and what if a script just goes berserk or something? You can't just suspend an account without checking what is wrong first.

    Don't you agree?
     
  18. AlaskanWolf

    AlaskanWolf Well-Known Member

    Joined:
    Aug 11, 2001
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Fremont CA
    I would rather leave that as a option......

    Companies like us with over a thousand customers, its hard spend time on finding a script when the acct is still active.

    I would rather have it automatically suspend an acct if a thres is reached...
     
  19. hostbet

    hostbet Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    I will love that also, them I will love Cpanel for ever just for that feature.


    [quote:0bf809e201][i:0bf809e201]Originally posted by gorgo[/i:0bf809e201]

    I would like the ability for WHM to automatically suspend an accounts if they reach a treshhold level.

    Lets say if a user goes over 10% CPU time, or 15% Memory, they automatically get suspended...


    Thanks[/quote:0bf809e201]
     
  20. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    if you guys just want to kill perl scripts and user process's (not apache, mysql, basically just perl scripts and other process's that the users execute from the command line) you can just use bursts script. it's in the scripts dir. it's called like burstmonitor. It's a script that will monitor process's and if the process isnt run by root or nobody it will kill the process if it lives too long and or uses too much cpu.
     
Loading...

Share This Page