-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alex Brollo:
> Have I some Unix tool to evaluate server resource used running a script?

Yes, but it depends on operating system.  If you're using a Solaris server 
(willow), use prstat:

 $ prstat -aU $LOGNAME

Or on Linux (nightshade), use top:

 $ top -u $LOGNAME

Both of these will show a list of all your processes, and various statistics, 
including CPU and memory use.  (prstat will also show a summary of your entire 
resource use.)

The interesting figures are CPU use and resident memory (called "RES" in top, 
and "RSS" in prstat).  "CPU" is the amount of CPU (in percent) that your 
process is using.  prstat shows this as total of all CPU cores, so 12.5% CPU 
means your process is using one entire CPU core (since the login servers have 8 
cores, and 100/8=12.5).  top shows this as total of a single core, so an entire 
core shows as 100% (and 200% would mean it was using two cores).

Generally you shouldn't use 100% CPU constantly, but it's okay for a program to 
use a lot of CPU sometimes and sleep (using none) at other times.  What is
acceptable CPU use really depends on what the program does; if it makes 1 edit 
to the wiki per hour and does nothing else, using 10% CPU is probably 
excessive.  On the other hand, a script that does complicated processing might 
easily use 25%. 

RES/RSS (resident memory) is the amount of RAM being used by the program.  
There is a hard limit of 1GB per user on each server, but most tools should use 
a *lot* less than that.  Again, it really depends on what the tool does.

You shouldn't worry too much about resource use as long as it's not excessive.  
We (TS admins) will let you know if you seem to be using too many resources.

> Feel free to send me your best link to a tutorial "Unix for dummies".

I usually recommend the book "Understanding UNIX" by Stan Kelly-Bootle, but 
unfortunately it's out of print, and it also doesn't answer this particular 
question.  (But it does tell you just about everything else you'd want to 
know.)

        - river.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iEYEARECAAYFAkzjoyYACgkQIXd7fCuc5vLXQQCfaNGCiuxzXsBh1/7qabeliet7
a5oAn0VIuwQQ1nhFqX7LGVgcicXyyx8U
=5878
-----END PGP SIGNATURE-----

_______________________________________________
Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/toolserver-l
Posting guidelines for this list: 
https://wiki.toolserver.org/view/Mailing_list_etiquette

Reply via email to