[gull] Truc et astuces: [OpenVZ] A qui appartient un process

Stéphane Graber stgraber at ubuntu.com
Mon Sep 27 14:10:08 CEST 2010


On Mon, 2010-09-27 at 08:23 +0200, Félix Hauri wrote:
> On Fri, Sep 24, 2010 at 05:22:32PM -0400, Stéphane Graber wrote:
> > > concis.
> > 
> > Hehe, en effet, je n'ai pas vraiment le reflex d'utiliser pgrep en
> > dehors de dans mes scripts.
> > 
> > "pgrep -n apache2" aurait donné un résultat similaire et "vzpid $(pgrep
> > -n apache2)" aurait montré dans quelle VZ il roule.
> 
> Interessant, en effet (au fait pourquoi ``-n'' ? ):
> # vzpid $(pgrep sshd)
> Pid     VEID    Name
> 8333    0       sshd
> 10057   100     sshd
> 10094   102     sshd

Parce que c'est un host stockant plus d'une centaine de VZ roulant des
apache, ça aurait donné un peu trop d'output :)

> Bon sang, cela fait un moment que je n'ai pas lu
>   ``dpkg -L procps | grep man/.*.gz''
> 
> Cela dit, il est quand-même bon de savoir utiliser /proc/ et ``sed'', dont
> on dispose en général, dans n'importe quel busybox, en mode ``rescue''.


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://forum.linux-gull.ch/pipermail/gull/attachments/20100927/db6635d3/attachment.pgp>


More information about the gull mailing list