PIKT

Samples: Process Count Limits

PIKT Logo
Home FAQ News Intro Samples Tutorial Reference Software Authors Licensing SiteSearch


This per_user_process_counts_objects.cfg example specifies process count limits, which if exceeded, the count may be logged, alert e-mail may be sent, systems administrators may be paged, and/or the indicated processes may be killed.
///////////////////////////////////////////////////////////////////////////////
//
// per_user_process_counts_objects.cfg
//
///////////////////////////////////////////////////////////////////////////////

PerUserProcessCounts

// 0 signifies take no action; 1 signifies always take action

// note:  the process counts are per-user counts, not overall counts; many
// processes, for example sendmail, are root-owned

#setdef deftmp = test
#setdef test = FALSE

#ifndef test

//      process         log             alert           page            kill

        inetd           2               3               4               0

#  if mailserver
#    if moscow
        // root-owned
        sendmail        100             200             300             500
        python          50              100             150             200
        sh              50              100             150             200
        // user-owned
        popper          5               10              20              30
        imapd           3               4               999             5
#    else
        sendmail        50              100             150             200
#    endif
#  else
        sendmail        10              20              40              60
#  endif

#  if webserver
        httpd           10              20              40              80
#  endif

#  if nisserver
        ypserv          2               4               5               0
#  endif

//      crack           1               1               1               1
//      sniffit         1               1               1               1
//      ...

[...]

// wildcard should be last in PerUserProcessCounts list
#  if milan
        \\*             20              60              100             0
#  else
        \\*             20              40              60              0
#  endif

#elsedef  // test

//      process         log             alert           page            kill

#  if moscow
        imapd           1               3               999             0
#  endif
#  if mailserver
        sendmail        1               3               999             0
#  else
        sendmail        1               2               999             0
#  endif
#  if webserver
        httpd           1               3               999             0
#  endif
#  if nisserver
        ypserv          1               3               999             0
#  endif
        crack           1               1               1               1
        sniffit         1               1               1               1
//      ...
// wildcard should be last in PerUserProcessCounts list
        \\*             1               5               999             0

#endifdef  // test

#setdef test = deftmp

///////////////////////////////////////////////////////////////////////////////
On the piktmaster system, we would install the PerUserProcessCounts.obj file to each PIKT slave system with the command:
# piktc -iv +O PerUserProcessCounts +H all        [or: ... -H downsys]

[For more examples, see Samples.]


Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software | Authors | Licensing | SiteSearch
Links | SiteIndex | Pikt-Users | Pikt-Workers | Contribute | ContactUs | Top of Page
Page best viewed at 1024x768.   Page last updated 2005-06-22.
This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.
Copyright © 1998-2005 Robert Osterlund.  All rights reserved.

Computer Books at Amazon.com

Running Linux
Running Linux

CVS Pocket Reference
CVS Pocket Reference

SuSE Linux Enterprise Server 9 Administrator's Handbook
SuSE Linux Enterprise Server 9 Administrator's Handbook

Beginning SuSE Linux: From Novice To Professional
Beginning SuSE Linux: From Novice To Professional

Red Hat Linux Bible: Fedora and Enterprise Edition
Red Hat Linux Bible: Fedora and Enterprise Edition