LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-31-2001, 01:06 AM   #1
anoop_chandran
Member
 
Registered: Nov 2001
Distribution: Redhat 7.0 ,mandrake 8.0 ,Redhat 7.2
Posts: 99

Rep: Reputation: 15
top question


hi,
this is the output of the "top" command :

12:23pm up 2:50, 4 users,load average:1.00,1.12, 1.07
80 processes: 78 sleeping,2 running,0 zombie,0 stopped
CPU states: 88.2 % user,11.5% system,0.0% nice,0.0% idle
Mem 249488k av,129660k used,119820k free,94380k shrd,17140k buff
Swap:530104k av, 0k used,530104k free 56440 cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
1111 root 16 0 9400 9400 4936 R 98.8 3.7 171:18 java
1622 root 1 0 1052 1052 816 R 0.7 0.4 0:04 top
1104 root 0 0 9400 9400 4936 S 0.7 3.7 1:18 java
1 root 0 0 532 532 468 S 0.0 0.2 0:06 init
......
..........
398 root 0 0 612 612 464 S 0.0 0.2 0:00 syslogd

i am running a java program in my system to monitor the mail.as the output of top shows the %CPU for java is 98.8,could someone tell me whether this is "harmfull" for any other process or not. i don't know anything abt the program,yes i know that the program generates many threads(one of the guys who wrote the pgm told me).. but i feel that there is something wrong in this CPU usage ...and also the PRI flag is set to 16...

how can i bring it under "control"...or is this quite normal...?

bye
Anoop
 
Old 12-31-2001, 03:59 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
There are mail monitors out there that will not do that.

What is it monitoring?

It seems like something is very wrong with that picture.
 
Old 12-31-2001, 05:18 AM   #3
anoop_chandran
Member
 
Registered: Nov 2001
Distribution: Redhat 7.0 ,mandrake 8.0 ,Redhat 7.2
Posts: 99

Original Poster
Rep: Reputation: 15
well ,the pgm is supposed to monitor mail of every user in the server; mail directory -->> /var/spool/mail/user

and i was told the pgm also looks for pppx.pid ,b'oz there is a dialin setup running...if it finds any ppp0.pid the pgm looks for the logfile generated by ppp (specified in /etc/ppp/options ) and process it..
then update some database and something like that....aaaaahhh

this is the top command output a little while ago:

4:33pm up 7:00, 5 users, load average: 1.03, 1.01, 1.00
processes: 78 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: 90.0% user, 9.4% system, 0.0% nice, 0.4% idle
Mem: 249488K av, 139744K used, 109744K free, 94948K shrd, 22968K buff
Swap: 530104K av, 0K used, 530104K free 59108K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
1111 root 16 0 9400 9400 4936 R 98.0 3.7 414:16 java
1926 root 1 0 1048 1048 816 R 1.9 0.4 0:00 top
1 root 0 0 532 532 468 S 0.0 0.2 0:06 init
2 root 0 0 0 0 0 SW 0.0 0.0 0:00 kflushd
3 root 0 0 0 0 0 SW 0.0 0.0 0:00 kupdate
4 root 0 0 0 0 0 SW 0.0 0.0 0:00 kpiod
5 root 0 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root -20 -20 0 0 0 SW< 0.0 0.0 0:00 mdrecoveryd
398 root 0 0 612 612 512 S 0.0 0.2 0:01 syslogd
408 root 0 0 864 864 464 S 0.0 0.3 0:00 klogd
423 rpc 0 0 576 576 484 S 0.0 0.2 0:00 portmap
439 root 0 0 0 0 0 SW 0.0 0.0 0:00 lockd
440 root 0 0 0 0 0 SW 0.0 0.0 0:00 rpciod
450 rpcuser 0 0 768 768 656 S 0.0 0.3 0:00 rpc.statd
465 root 0 0 524 524 460 S 0.0 0.2 0:00 apmd
516 root 0 0 628 628 528 S 0.0 0.2 0:00 automount
569 nobody 0 0 720 720 608 S 0.0 0.2 0:00 identd

so that's it .........java still comes first.....could u tell me what could be missing in the pgm ,or what i should do to stabilize....

ps ax gives this........

1103 ? S 0.00 /usr/java/jdk1.3.1/bin/i386/native_thread/java AppServer
1104 ? S 2.50 /usr/java/jdk1.3.1/bin/i386/native_thread/java AppServer
1105 ? S 0.00 /usr/java/jdk1.3.1/bin/i386/native_thread/java AppServer
.
.
.
1110 ? S 0.00 /usr/java/jdk1.3.1/bin/i386/native_thread/java AppServer
1111 ? R 443.33 /usr/java/jdk1.3.1/bin/i386/native_thread/java AppServer


does that provide any idea?

bye n thanx
 
Old 12-31-2001, 11:51 AM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
It just seems to be constantly going?

Does it slow the machine down?

I would consider if I really need it or not.

What is your CPU? maybe it is not suitable for the amount of system you have.
 
Old 12-31-2001, 12:41 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I just was checking my system while running java Pool.

The java_vm uses a lot of memory, and up to about 14% sometimes on my CPU.

Is your swap file in heavy use? That could add to the CPU use a lot.
 
Old 12-31-2001, 10:02 PM   #6
anoop_chandran
Member
 
Registered: Nov 2001
Distribution: Redhat 7.0 ,mandrake 8.0 ,Redhat 7.2
Posts: 99

Original Poster
Rep: Reputation: 15
HAPPY NEW YEAR

the system doesn't seem to be slow...


Distribution Version: Red Hat Linux release 7.0 (Guinness)

Operating System Version: #1 Tue Aug 22 16:49:06 EDT 2000
Operating System Release: 2.2.16-22
Processor Type: i686
pIII 933 MHz with 256 MB RAM ,
i have 512MB swap partition ,but as the top shows that 0k of swap is used...
i have squid running and seems to be slow,but does that have anything to do with java...maybe memory matters for squid...


even now i have 96.3 %CPU by java

output of free--->>
total used free shared buffers cached
Mem: 249488 209556 39932 105560 85952 51568
-/+ buffers/cache:72036 177452
Swap: 530104 0 530104


that's it ,swap is not being used....


suggestions....?

bye n thanx
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bloddy Newbie Question: How to install Bash + top ? fluppi AIX 3 12-16-2005 10:00 AM
question re output of "top" slackist Linux - Newbie 2 04-12-2004 08:13 AM
Question re: 'top' and mem usage... pistonhonda Linux - Newbie 6 11-16-2003 02:12 AM
Best: Question about X and top Scythe Slackware 3 10-15-2003 11:05 AM
"top" command memory question chanys Linux - General 4 03-14-2003 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration