Menu

Tree [1c381a] master /
 History

HTTPS access


File Date Author Commit
 readme.htm 2012-07-20 Markus Wawersich Markus Wawersich [1c381a] updated the docu
 vzps.pl 2012-07-19 Markus Wawersich Markus Wawersich [165e70] first commit

Read Me

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


<!-- ############################################################################################ -->
<!-- ################# Namo verwendet im Editor nur den ersten style-Tag. ####################### -->
<!-- ################# Daher hier zuerst screen.css                       ####################### -->
<!-- ############################################################################################ -->

<!-- ################# Daten aus _doku_screen.css ############################################### -->
<style type="text/css" title="text/css" media="screen">

/* CSS fuer Bildschirmausgabe */

pre  {
       font-family:Monospace;
       font-size: 100%;
       padding: 0.5em;
       background-color: #EEEEFF;
       border: 1px solid #AAAAAA;
     }

pre.rot,pre.root {
           background-color: #FFDDDD;
         }

pre.text {
           background-color: #FFFFFF;
         }
pre.shell {
           font-size: 9pt;
           background-color: #000000;
           color: #bbbbbb;
         }

code {
       font-family:Monospace;
       padding: 0;
       background-color: #EEEEEE;
       border: 1px dashed #AAAAAA;
     }

a:link    { color:#212195; text-decoration:underline;}
a:visited { color:#212195; text-decoration:underline;}
a:active  { color:#212195; text-decoration:underline;}
a:hover   { color:#000000; text-decoration:underline; background-color:#cccccc;}

</style>


<!-- ################# Daten aus _doku_all.css  ################################################# -->
<style type="text/css" title="text/css" media="all">

/* CSS fuer Druck und Bildschirm */

* {
  /* color:#000000; */
  font-size:1em;
}

pre {
      font-family:Monospace;
      padding: 0.5em;
    }

h1 { font-size: 200%; font-weight:bold; }
h2 { font-size: 150%; font-weight:bold; }
h3 { font-size: 120%; font-weight:bold; }

/* nur li (list item) in einer ul (unsorted list) */
ul li {
	list-style-type: disc;
      }

/*
b,b * {font-weight:bold;}
i,i * {font-style: italic;}
u,u * {text-decoration:underline;}
*/

p       {
          margin:0.5em;
        }
table p {
          margin:0;
        }

td,th   {
          padding:3px;
        }

table    {
           margin:0;
	   border-collapse: collapse;

	 }
table,td {
          border: 1px solid #000;
         }

th       {
           background-color: #EEEEEE;
         }

</style>
<!-- ################# Daten aus _doku_print.css ################################################ -->
<style type="text/css" title="text/css" media="print">

/* CSS fuer Druckerausgabe */

pre,pre.root  {
       font-family:Monospace;
       font-size: 80%;
       padding: 0.5em;
       background-color: #FFFFFF;
       border: 1px dashed #888888;
     }

pre.rot {
           background-color: #DDDDDD;
           border: 2px dashed #000000;
         }

pre.text {
           background-color: #DDDDDD;
           border: 1px solid #000000;
         }

code {
       font-family:Monospace;
       padding: 0;
       background-color: #FFFFFF;
       border: none;
       deaktiviert-border-bottom: 1px dashed #888888;
     }

a:link    { color:#000000; text-decoration:underline;}
a:visited { color:#000000; text-decoration:underline;}
a:active  { color:#000000; text-decoration:underline;}

</style>
<!-- ############################################################################################ -->


<title>vzps</title>
</head>

<body>

<h1>VZPS</h1>
<h2>Markus Wawersich <br> 20.07.2012</h2>
<p>&nbsp;</p>
<h2>Installation:</h2>
<p>Just copy the script vzps.pl in a folder with a path entry (i.e. <code>/usr/local/bin</code>). 
If You want you can make a symlink vp -&gt; vzps.pl so you can just type vp 
to run it.</p>
<h2>usage:</h2>
<p>vzps.pl [-a]</p>
<p>-a: display all output. don't cut the commandline parameters of the processes.</p>
<h2><span id="result_box" class="short_text" lang="en"><span class="hps">documentation</span></span></h2>
<pre class="shell"><span style="background-color:rgb(0,153,0);">(1)</span> VZ-PID  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND  [0] load: 0.83 0.57 0.16
            root         2  0.0  0.0      0     0 ?        S    May14   0:00 [kthreadd]
            root         3  0.0  0.0      0     0 ?        S    May14   0:01  \_ [migration/0]
            root         4  0.0  0.0      0     0 ?        S    May14   0:03  \_ [ksoftirqd/0]
            root         5  0.0  0.0      0     0 ?        S    May14   0:00  \_ [watchdog/0]
            root         1  0.0  0.0   2028   144 ?        Ss   May14   0:27 init [2]
            root      2136  0.0  0.0  45064   876 ?        Sl   May14   0:31 /usr/sbin/rsyslogd -c4
            root      2232  0.0  0.0   9100   316 ?        Ss   May14   1:42 /usr/sbin/apache2 -k start
            www-data 27941  0.0  0.0   8596   364 ?        S    Jul15   0:00  \_ /usr/sbin/apache2 -k start
            www-data 27942  0.0  0.1 231576  3508 ?        Sl   Jul15   0:00  \_ /usr/sbin/apache2 -k start
            www-data 27943  0.0  0.1 231344  3320 ?        Sl   Jul15   0:00  \_ /usr/sbin/apache2 -k start
            root      2376  0.0  0.0   1872   108 ?        Ss   May14   0:00 /usr/sbin/inetd
            root      2880  0.0  0.0   5492   496 ?        Ss   May14   0:00 /usr/sbin/sshd
            root      1924  0.0  0.1   8392  2876 ?        Ss   16:31   0:00  \_ sshd: root@pts/1
            root      1926  0.0  0.0   5040  1788 pts/1    Ss   16:31   0:00  |   \_ -bash
<span style="background-color:rgb(0,153,0);">(2)</span>         root      2038  0.0  0.0   5444  1792 pts/1    S+   16:40   0:00  |       \_ /usr/bin/perl -w vzps.pl
<span style="background-color:rgb(0,153,0);">(3)</span>         root      2041  0.0  0.0   4316   996 pts/1    R+   16:40   0:00  |           \_ ps wufax
            root      1986  0.0  0.1   8256  2860 ?        Ss   16:36   0:00  \_ sshd: root@pts/2
            root      1988  0.0  0.0   5040  1780 pts/2    Ss   16:36   0:00      \_ -bash
<span style="background-color:rgb(0,153,0);">(4)</span>         root      1993  0.0  0.0   2088   860 pts/2    S+   16:36   0:00          \_ vzctl enter linux1
            root      3438  0.0  0.0   1704    80 tty1     Ss+  May14   0:00 /sbin/getty 38400 tty1
            root      3439  0.0  0.0   1704    80 tty2     Ss+  May14   0:00 /sbin/getty 38400 tty2
<span style="background-color:rgb(0,153,0);">(5)</span> ======================================================================== linux1 [1] load: 0.26 0.20 0.18
<span style="background-color:rgb(0,153,0);">(6)</span> [ 7836] root      1994  0.0  0.0   2084   556 ?        Ss   16:36   0:00  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; \_ vzctl: pts/0
<span style="background-color:rgb(0,153,0);">(7)</span> [ 7837] root      1995  0.0  0.0   2736  1536 pts/0[V] Ss+  16:36   0:00                      \_ -bash
<span style="background-color:rgb(0,153,0);">(8)</span> [    1] root      3036  0.0  0.0    524    72 ?        Ss   May14   0:23 init [3]
    [  392] root      4319  0.0  0.0   2316   252 ?        Ss   May14   0:00  \_ /usr/sbin/sshd
    [  399] root      4327  0.0  0.0   1440   260 ?        Ss   May14   0:03  \_ /sbin/syslogd
    [  418] root      4396  0.0  0.0   1508   196 ?        Ss   May14   0:03  \_ /usr/sbin/cron
    [  470] root      4490  0.0  0.0   1400   156 ?        Ss   May14   0:00  \_ /usr/sbin/inetd
    [13111] root     32200  0.0  0.0   2832   328 ?        Ss   May29   0:52  \_ /usr/sbin/httpd
    [ 1539] 30        1040  0.0  0.0   2912  1072 ?        S    Jul17   0:00      \_ /usr/sbin/httpd
    [ 7779] 30        1564  0.0  0.0   2856   552 ?        S    16:06   0:00      \_ /usr/sbin/httpd
    ======================================================================== linux2 [2] load: 0.50 0.25 0.11
    [    1] root      3126  0.0  0.0    536    52 ?        Ss   May14   0:24 init [3]
    [  182] root      3863  0.0  0.0   1472   224 ?        Ss   May14   0:03  \_ /sbin/syslogd
    [  184] root      3877  0.0  0.0   2384   176 ?        Ss   May14   0:00  \_ /usr/sbin/sshd
    [  186] root      3885  0.0  0.0   1404     4 ?        Ss   May14   0:00  \_ /sbin/klogd -c 1
    [  259] root      4350  0.0  0.0   2804   108 ?        S    May14   0:00  \_ /usr/sbin/sendmail -bd -q30m -om
    [  287] root      4395  0.0  0.0   1536   128 ?        Ss   May14   0:03  \_ /usr/sbin/cron
    [  301] root      4426  0.0  0.0   1428     4 ?        Ss   May14   0:00  \_ /usr/sbin/inetd
    ======================================================================== test1 [3] load: 0.00 0.00 0.00
    [    1] root      3246  0.0  0.0   2032    72 ?        Ss   May14   0:24 init [2]
    [  247] root      3857  0.0  0.0   1740   396 ?        Ss   May14   0:04  \_ /sbin/syslogd
    [  268] root      3976  0.0  0.0   2292   160 ?        Ss   May14   0:02  \_ /usr/sbin/cron
    [  273] dovecot   4018  0.0  0.0   2580    20 ?        Ss   May14   0:00  \_ /usr/bin/dbus-daemon --system
    [  519] sshd      4453  0.0  0.0   6516   144 ?        Ss   May14   0:00  \_ /usr/sbin/exim4 -bd -q30m
    [  530] root      4510  0.0  0.0   5496   332 ?        Ss   May14   0:00  \_ /usr/sbin/sshd

</pre>
<p>(1) Here You see the headers of the ps command. Additional you can see the 
column VZ-PID. This ist the PID inside the VZ. As You can see in line (7) the 
ini process has a VZ-PID:1 but a real PID:3036 outside in the hardware node.</p>
<p>You also see after &quot;COMMAND&quot;:<code>[0] load: 0.83 0.57 0.16</code> 
[0] is the VZ-Number (here 0=hardware node) and the other numbers are the load.</p>
<p>(2) + (3) This is the vzps.pl script and the ps command</p>
<p>(4) Here you see a <code>vzvtl enter linux1</code>&nbsp;command. The other 
two processes (vzctl and bash) are inside the VZ &quot;linux1&quot;. See (6)</p>
<p>(5) Here begins the firs VZ &quot;linux1&quot; with the VZ-Number 1 and the 
load &quot;0.26 0.20 0.18&quot;</p>
<p>(6) This is the vzctl command started from (4)</p>
<p>(7) this is the bash from the <code>vzctl enter</code> command. Instead of 
the ugly <code>/var/lib/vz/root/1/dev/pts/0</code> (whith is much to long) You 
see <code>pts/0[V]</code> which fits inside the ps columns.</p>
<p>(8) here You see a ini proces of the VZ linux1. the Real-PID (outside) is 
3036, but the PID inside the VZ is 1.</p>
<p><a href="https://sourceforge.net/projects/vzps/">https://sourceforge.net/projects/vzps/</a> 
</p>
<p>&nbsp;</p>
</body>

</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.