Re: mysql hiding from top

2009-05-03 Thread Wayne Sierke
On Mon, 2009-04-27 at 18:49 +0200, Zbigniew Szalbot wrote:
 hello,
 
 Today I have finally upgraded my system to 7.1-RELEASE and just noticing
 that mysql process is not being shown via the top command.
 
   PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
  1612 root1  200  9212K  6716K pause  2   0:26  0.00% perl5.8.9
   966 www 1   80  8236K  5452K nanslp 2   0:22  0.00% perl5.8.9
  1594 root1  200  8740K  6220K pause  0   0:12  0.00% perl5.8.9
 
 However, if you grep processes, you can see it should be displayed in the
 top entries.
 $ ps ax |grep mysql
 32880  p0- I  0:00.00 /bin/sh /usr/local/bin/mysqld_safe...
 32906  p0- S  1:33.72 /usr/local/libexec/mysqld...
 
 I can live with that but maybe there's some explanation for this?
 
 Thanks!
 
From the manpage for top(1):
FreeBSD NOTES
DISPLAY OF THREADS
   The  '-H'  option will toggle the display of kernel visible 
thread con-
   texts.  At runtime the 'H' key will toggle this mode.  The  
default  is
   OFF.

Should reveal the missing thread(s). This was raised by someone else
last November also examining mysqld. Look for a thread titled top
incorrectly reporting process time.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Chuck Swiger

Hi--

On Apr 27, 2009, at 9:49 AM, Zbigniew Szalbot wrote:
However, if you grep processes, you can see it should be displayed  
in the

top entries.
$ ps ax |grep mysql
32880  p0- I  0:00.00 /bin/sh /usr/local/bin/mysqld_safe...
32906  p0- S  1:33.72 /usr/local/libexec/mysqld...

I can live with that but maybe there's some explanation for this?


The process is sleeping-- perhaps it isn't using enough CPU to make it  
into the list using default sort ordering?  Try top -o time,  
perhaps


Regards,
--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Zbigniew Szalbot
Hello,

 Top doesn't show *all* processes.  It shows the processes using the most
 cpu
 (by default.  You can also display by io.)  So, if mysqld isn't using a
 lot of
 cpu, it's not going to show up in the list.  You might be able to force it
 to
 show up by giving top a number (of processes you want to see) that
 includes
 enough that mysqld will show up.

Thank you Paul! Yes, I know that. Prior to upgrade mysql was always on top
as it used most time. And I can see it now when it is active but it is
quite strange that it does not get displayed when the system is idle. Not
even when I do top -o time.

Thanks!

-- 
Zbigniew Szalbot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Zbigniew Szalbot
Hi there,


 The process is sleeping-- perhaps it isn't using enough CPU to make it
 into the list using default sort ordering?  Try top -o time,
 perhaps

No, this is a different issue. Take a look:

  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
88268 www 1  470 40260K 29336K select 2   0:03  2.49% httpd
89632 www 1  440 33648K 23352K CPU0   0   0:00  0.78% httpd
89290 www 1  200 25456K 17760K lockf  2   0:01  0.68% httpd
89074 www 1  440 26384K 17696K select 2   0:00  0.20% httpd
32906 mysql  37   40 76636K 41664K sbwait 1   0:00  0.10% mysqld

It does appear at times but it is showing 0:00 TIME. But compare it to the
same mysql pid below:

$ ps ax |grep mysql
32906  p0- S  1:41.77 /usr/local/libexec/mysqld

This is what I find strange... :)


-- 
Zbigniew Szalbot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Chuck Swiger

On Apr 27, 2009, at 10:22 AM, Zbigniew Szalbot wrote:
  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU  
COMMAND

[ ... ]
32906 mysql  37   40 76636K 41664K sbwait 1   0:00  0.10%  
mysqld


It does appear at times but it is showing 0:00 TIME. But compare it  
to the

same mysql pid below:

$ ps ax |grep mysql
32906  p0- S  1:41.77 /usr/local/libexec/mysqld

This is what I find strange... :)


Ah-- I've heard rumors that top or something doesn't handle accounting  
for CPU time used by multithreaded processes very well...


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Zbigniew Szalbot
 Ah-- I've heard rumors that top or something doesn't handle accounting
 for CPU time used by multithreaded processes very well...

OK. Well I have never had any problem with that on FreeBSD 7.0-RELEASE. It
started misbehaving today right after an upgrade to 7.1-RELEASE. Like I
said, I can really live with that! :)

Thank you!

-- 
Zbigniew Szalbot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Chuck Swiger

On Apr 27, 2009, at 10:33 AM, Zbigniew Szalbot wrote:
Ah-- I've heard rumors that top or something doesn't handle  
accounting

for CPU time used by multithreaded processes very well...


OK. Well I have never had any problem with that on FreeBSD 7.0- 
RELEASE. It
started misbehaving today right after an upgrade to 7.1-RELEASE.  
Like I

said, I can really live with that! :)


True, although if it's readily reproducible, it would be good to fix.


Thank you!


You're most welcome,
--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Paul Schmehl
--On Monday, April 27, 2009 11:49:55 -0500 Zbigniew Szalbot 
z.szal...@lcwords.com wrote:




hello,

Today I have finally upgraded my system to 7.1-RELEASE and just noticing
that mysql process is not being shown via the top command.

  PID USERNAME  THR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
 1612 root1  200  9212K  6716K pause  2   0:26  0.00% perl5.8.9
  966 www 1   80  8236K  5452K nanslp 2   0:22  0.00% perl5.8.9
 1594 root1  200  8740K  6220K pause  0   0:12  0.00% perl5.8.9

However, if you grep processes, you can see it should be displayed in the
top entries.
$ ps ax |grep mysql
32880  p0- I  0:00.00 /bin/sh /usr/local/bin/mysqld_safe...
32906  p0- S  1:33.72 /usr/local/libexec/mysqld...

I can live with that but maybe there's some explanation for this?



Top doesn't show *all* processes.  It shows the processes using the most cpu 
(by default.  You can also display by io.)  So, if mysqld isn't using a lot of 
cpu, it's not going to show up in the list.  You might be able to force it to 
show up by giving top a number (of processes you want to see) that includes 
enough that mysqld will show up.


--
Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
***
Check the headers before clicking on Reply.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: mysql hiding from top

2009-04-27 Thread Zbigniew Szalbot
 True, although if it's readily reproducible, it would be good to fix.

I'd be happy to test but I do not know what to do/where to start. I know
it is a permanent issue, because I even restarted the mysql server
thinking that something is wrong that it is not being shown in top but the
history repeated itself.

Thanks Chuck - I appreciate the time you use to help.

-- 
Zbigniew Szalbot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org