Top 'user' reaches 100% many times


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Top 'user' reaches 100% many times
# 1  
Old 02-20-2006
Top 'user' reaches 100% many times

Actually, I have 2 questions. At this moment I am running a site which has a lot of visitors. The current server has some problems with running, and I'dd like to see if I can optimize the code to prevent having to upgrade the server.

At this moment if I type 'top' on the unix server I see
a user, a system, a nice and a idle.

The system comes at the highest on 5%, the user reaches the 100% quite often, and the Idle is what left over at the moment, going from 97.7% to 0%.

My questions:
1) When the userstat is at 100%, does this probably mean that to many users are connecting to the website at the same time, or is also possible that each user has to do many requests when reaching certain pages?

2) When the 'user' maxes out, the sites gets slow. Does Unix have a possibility to see a list with the user requests, currently processed?
# 2  
Old 02-23-2006
What is your OS and version?

top usually give the following type of output - and refreshes every n seconds (default of 5 seconds)
Code:
$ top
top - 09:20:46 up 118 days, 8 min,  4 users,  load average: 0.51, 0.16, 0.04
Tasks:  96 total,   3 running,  93 sleeping,   0 stopped,   0 zombie
Cpu(s): 61.8% us, 37.5% sy,  0.7% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    125784k total,   122688k used,     3096k free,     3280k buffers
Swap:   262136k total,    98292k used,   163844k free,    32456k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
28844 rchter  25   0  4652 1140  872 R 98.4  0.9   0:16.62 cpuhog
24913 rchter  25  10 34960 9084 6172 R  1.0  7.2   1991:52 rhn-applet-gui
28845 tghder  16   0  2016  980  784 R  0.7  0.8   0:00.11 top
 2014 root      17   0  2152  740  724 S  0.3  0.6   0:37.23 hald-addon-stor
    1 root      16   0  1748  496  464 S  0.0  0.4   0:03.37 init

So your system, when at 100% could be slow - but you should be able to see the processes that are causing this condition.
# 3  
Old 03-01-2006
My knowledge about Unix is very limited. How can I determine the current version/ OS?

My 'top' produces the following:

Code:
top - 09:40:12 up 84 days,  1:13,  0 users,  load average: 4.02, 2.31, 1.70
Tasks:   3 total,   2 running,   1 sleeping,   0 stopped,   0 zombie
Cpu(s):  98.7% user,   1.3% system,   0.0% nice,   0.0% idle
Mem:   1031484k total,   921368k used,   110116k free,   116640k buffers
Swap:  2097136k total,        0k used,  2097136k free,   490452k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  Command
30796 badkame    9   0  1656 1656 1368 S  0.0  0.2   0:00.03 bash
30816 badkame    9   0   872  872  724 R  0.0  0.1   0:00.02 top
30795 badkame    9   0  1836 1832 1696 R  0.0  0.2   0:00.00 sshd

# 4  
Old 03-01-2006
Quote:
Originally Posted by Wexxl
My knowledge about Unix is very limited. How can I determine the current version/ OS?
$ uname -a
# 5  
Old 03-01-2006
Linux s01.mywebsite.nl 2.4.31-widexs #1 SMP Tue Aug 23 13:44:28 MEST 2005 i686 unknown
# 6  
Old 03-01-2006
Quote:
Originally Posted by Wexxl
Linux s01.mywebsite.nl 2.4.31-widexs #1 SMP Tue Aug 23 13:44:28 MEST 2005 i686 unknown
Linux - your OS
s01.mywebsite.n - your host
2.4.31-widexs #1 SMP - your kernel
Tue Aug 23 13:44:28 MEST 2005 - date then it was be compiled
i686 unknown - processor (intel pentium II or higher)

you can type man uname in command prompt to get more info about uname
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. What is on Your Mind?

RudiC reaches over 4000 thanks in 6 years.

Congratulations. Nice one RudiC. That is some going, well done! Bazza. (8 Replies)
Discussion started by: wisecracker
8 Replies

2. SCO

User process information and idle times

My company uses a proprietary GUI to its business system (Strategix) which runs on Windows clients, whereas the back-end runs on a SCO OpenServer 5.0.6a server. We're moving to a new business system next year and the business is growing and we're running out of licences on Strategix and making... (1 Reply)
Discussion started by: mmcardle
1 Replies

3. Solaris

Particular user account shouldn't be locked after entering wrong passwd specfic no. times

Hi all In my system we have implemented user lockout feature after 3 failure attempt if he tries to login directly or if he run the any command through sudo and enter wrong password thrice. Now I have requirement in which particular user account shouldn't be locked when he run the command... (1 Reply)
Discussion started by: sb200
1 Replies

4. Programming

Problem with implementing the times() function in C (struct tms times return zero/negative values)

Hello, i'm trying to implement the times() function and i'm programming in C. I'm using the "struct tms" structure which consists of the fields: The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process. The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies

5. AIX

Switch user(su) two times

Is it possible to switch to root(if allowed) and then with root privileges switch to another user account "ABC"? To further explain the scenario, ABC is an account which has sugroups=su2DEF and root is not part of su2DEF group. but, given that root can switch to any account(correct me if I am... (7 Replies)
Discussion started by: mtwain
7 Replies

6. Shell Programming and Scripting

Number of times a user is "connected"?

hi i wish make a shell to look for the number of times a user is connected then makes a "whatch dog" by crontab to handle this i could do it through ps-fedal| grep user_name | wc-l ... etc. but others suggested me another algorithm :mad: and thought to use w, or finger, or who but it have a... (1 Reply)
Discussion started by: edgar287
1 Replies

7. UNIX for Dummies Questions & Answers

top's USER column width variation

hello, does anyone know how to expand the column width so it could contain full USER cell and not cut it in top ? Now it has eleven symbols but I can see only eight actualy I found only PID, PPID and %CPU columns variation possibilities in changelog (procps v.3.2.5). thanks in advance. (1 Reply)
Discussion started by: bugs_moran
1 Replies

8. Solaris

How to get a mail when the partition reaches 75% in solaris

Hi Every one, I am new to Solaris and i want to know how to get a mail when the partition reaches certain Ex-75% percentage, and how to write shell script. I hope some one will help me. Thanks and Regards, Venkatesh. ##edit#by#moderator## don't post your email address here... (1 Reply)
Discussion started by: 1409.venkatesh
1 Replies
Login or Register to Ask a Question