Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Apr 2003 14:00:08 +0400
From:      Sergey Zaikov <Sergey_Zaikov@p66.f5.klax.tsu.tula.ru>
To:        "Questions@freebsd.Org" <Questions@freebsd.Org>
Subject:   the ps utility and cron
Message-ID:  <1051024696@p66.f5.n5022.z2.fidonet>

next in thread | raw e-mail | index | archive | help
                   Hello, Questions@freebsd.Org!!!

I have a question about a key -x from man ps(1).
The reason of my question may be: misunderstanding man ps(1), errata at man
ps(1) or error in ps utility.

(My FreeBSD version:
FreeBSD acc.acc.tula.ru 4.7-RELEASE FreeBSD 4.7-RELEASE #38: Thu Mar 20
09:31:30 MSK 2003     acc107_3@acc.acc.tula.ru:/usr/obj/usr/src/sys/Z  i386)

Man ps (1) says:
[*SKIP*]
 -x      Display information about processes without controlling termi-
         nals.
[*SKIP*]
A processes, started from cron, is processes without controlling terminals. (Or
I samething don't understand:)
So:
$> ps -ax -U acc107_3
must diplays it and
$>ps -a -U acc107_3
should don't displays this processes.

I do easy test:

I write at crontab: 0 11 * * * /bin/sleep 60
and wait for 11-00 time.

At 11-00 I do:
   For user 'acc107_3':
acc:/usr/export/acc107_3>ps -ax -U acc107_3
  PID  TT  STAT      TIME COMMAND
  544  ??  Ss     0:00,00 /bin/sh -c /bin/sleep 60
  545  ??  S      0:00,00 /bin/sleep 60
  473  p0  Ss+    0:00,12 -tcsh (tcsh)
  474  p1  Rs     0:00,12 -tcsh (tcsh)
  548  p1  R+     0:00,00 ps -ax -U acc107_3
acc:/usr/export/acc107_3>ps -a -U acc107_3
  PID  TT  STAT      TIME COMMAND
  544  ??  Ss     0:00,00 /bin/sh -c /bin/sleep 60
  545  ??  S      0:00,00 /bin/sleep 60
  473  p0  Ss+    0:00,12 -tcsh (tcsh)
  474  p1  Ss     0:00,12 -tcsh (tcsh)
  549  p1  R+     0:00,00 ps -a -U acc107_3
  For user 'root':
acc:/usr/export/acc107_3>ps -a -U acc107_3
  PID  TT  STAT      TIME COMMAND
  544  ??  Is     0:00,00 /bin/sh -c /bin/sleep 60
  545  ??  I      0:00,00 /bin/sleep 60
  473  p0  Is+    0:00,12 -tcsh (tcsh)
  474  p1  Is+    0:00,12 -tcsh (tcsh)
  551  p2  Is     0:00,03 -tcsh (tcsh)
acc:/usr/export/acc107_3>ps -ax -U acc107_3
  PID  TT  STAT      TIME COMMAND
  544  ??  Is     0:00,00 /bin/sh -c /bin/sleep 60
  545  ??  I      0:00,00 /bin/sleep 60
  473  p0  Is+    0:00,12 -tcsh (tcsh)
  474  p1  Is+    0:00,12 -tcsh (tcsh)
  551  p2  Is     0:00,03 -tcsh (tcsh)

At both cases, the processes, started by cron, always displays.

Is it right?

Thank you.

                                                          Sergey.
... Знание - столь дpагоценная вещь, что его не зазоpно добывать из любого



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1051024696>