systems.cfg is where you specify computer system hostnames, aliases, and groups. The top-level systems.cfg file might reference smaller #include files, some of them perhaps auto-generated.
You use these systems specifications together with the '#if <machine class>' preprocessor directive to customize your PIKT configurations on a per-machine(s) basis and/or by operating system.
This is a rather elaborate example systems.cfg file, with many different host groups and aliases and auto-generated #include files. Especially for smaller organizations, a typical systems.cfg might be much simpler than this.
///////////////////////////////////////////////////////////////////////////////
//
// PIKT systems.cfg -- host systems, aliases, and groups
//
///////////////////////////////////////////////////////////////////////////////
//
// since #if-#endif's reference system names, this file cannot contain
// any #if-#endif's, since the system names are still in the process of
// specification! (neither can this file contain #ifdef's or any of the
// other #-style preprocessor directives, except for #include; it can
// contain comments, though and obviously)
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// hosts, grouped by Unix or Linux operating system or operating system
// version
///////////////////////////////////////////////////////////////////////////////
solaris
hosts vienna
nantes berlin berlin2 warsaw moscow
athens2 athens4 milan
calais calais2 brussels
copenhagen madrid
kiev kiev2
paris paris4 paris5 paris6 paris7 paris8
hamburg cadiz trondheim rotterdam cologne naples
leiden ankara minsk uppsala padua bucharest sheffield
///////////////////////////////////////////////////////////////////////////////
// for linux, here is alternative way of registering hosts; here we
// subcategorize by os version, then in the hostgroups section below we
// aggregate the os subcategories into one big os host group (see the
// linux host groups below); doing it this way helps ensure that each
// host gets subcategorized; it also involves less typing overall
redhat
hosts manila davao dumaguete
suse
hosts vancouver toronto montreal calgary winnipeg ottawa
debian
hosts firenze murmansk
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// host aliases
vienna
aliases piktmaster // note: although =piktmaster is a
// predefined macro, the piktmaster
// alias here is needed if you want
// to use '#if piktmaster' later
// on in the configuration files
vienna.uppity.edu
piktdevsys
kiev
aliases antwerp
milan
aliases bonn rome
madrid
aliases madrid2
nantes
aliases nismaster ypmaster
paris
aliases paris3
moscow
aliases mailmanserver
// d153-82.twilight.zone.net
// aliases davao
// d153-241.twilight.zone.net
// aliases manila
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// host groups
///////////////////////////////////////////////////////////////////////////////
// since we reference downsys in many of the '#verbatim [<proc>] directives
// that follow, we want to specify downsys as early in systems.cfg as
// possible so that subsequent references are most up-to-date
downsys // set '-H downsys' for these
members // note: systems specially listed here must also be specially
// listed in the =downsys specification in macros.cfg
rotterdam
padua
#verbatim <systems/downsys_systems.cfg> [/pikt/lib/programs/downsys.pl 10]
///////////////////////////////////////////////////////////////////////////////
// linux hostgroups
linux
members
redhat
suse
debian
///////////////////////////////////////////////////////////////////////////////
// sun arch groups
sun4d
members
#verbatim <systems/sun4d_systems.cfg> [/pikt/bin/piktc -xI +C "=uname -a |
=egrep -i sun4d >/dev/null && =hostname"
+H solaris -H downsys 2>/dev/null]
sun4m
members
#verbatim <systems/sun4m_systems.cfg> [/pikt/bin/piktc -xI +C "=uname -a |
=egrep -i sun4m >/dev/null && =hostname"
+H solaris -H downsys 2>/dev/null]
sun4u
members
#verbatim <systems/sun4u_systems.cfg> [/pikt/bin/piktc -xI +C "=uname -a |
=egrep -i sun4u >/dev/null && =hostname"
+H solaris -H downsys 2>/dev/null]
///////////////////////////////////////////////////////////////////////////////
// administrative-class hostgroups
itsys
members vienna
nantes berlin berlin2 warsaw moscow
athens2 athens4 milan
calais calais2 brussels
copenhagen madrid
kiev kiev2
paris paris4 paris5 paris6 paris7 paris8
hamburg cadiz trondheim rotterdam cologne
murmansk firenze
manila davao dumaguete
suse
mussys
members nonitsys
pvtsys // private systems
members manila davao dumaguete
///////////////////////////////////////////////////////////////////////////////
// shared-systems hostgroups
mus
members
#verbatim <systems/mus_systems.cfg> [/pikt/bin/piktc -xI +C "=hostname |
=grep kiev" -H downsys 2>/dev/null]
perf
members
#verbatim <systems/perf_systems.cfg> [/pikt/bin/piktc -xI +C "=hostname |
=grep paris" -H downsys 2>/dev/null]
comp
members
milan
#verbatim <systems/comp_systems.cfg> [/pikt/bin/piktc -xI +C "=hostname |
=grep madrid" -H downsys 2>/dev/null]
///////////////////////////////////////////////////////////////////////////////
// it hostgroups
misscritsys // mission-critical systems
members
#include <systems/misscritsys_systems.cfg>
adminsys // administrative, non-user systems
members vienna
nantes
berlin berlin2
moscow
athens2 athens4
calais calais2 brussels
copenhagen cologne
systems // sysadmin systems
members hamburg cadiz trondheim
db // database systems
members athens2 athens4 milan
usersys // in effect an alias for sunsuser
members berlin berlin2
moscow madrid perf mus
backupclient
members solaris linux
///////////////////////////////////////////////////////////////////////////////
// server hostgroups
mailserver
members moscow paris // kiev
appserver
members berlin2 // berlin
printserver
members helsinki copenhagen
backupserver
members calais brussels // calais2
webserver
members
#verbatim <systems/webserver_systems.cfg> [/pikt/bin/piktc -xI +C "=psall |
=grep http | =egrep -v 'piktc|grep|ab2|-http' >/dev/null &&
=hostname" +H solaris -H downsys 2>/dev/null]
dnsserver
members calgary ottawa
dnsmaster
members calgary
dnsslave
members ottawa
///////////////////////////////////////////////////////////////////////////////
// nis hostgroups
nisserver
members
#include <systems/nisserver_systems.cfg>
nisclient
members solaris
///////////////////////////////////////////////////////////////////////////////
// nfs hostgroups
nfsserver
members
#verbatim <systems/nfsserver_systems.cfg>
[/pikt/bin/piktc -xI +C "=showmount -e |
=egrep -ivs 'rpc: program not registered|no exported file systems'
>/dev/null && =hostname" +H solaris -H downsys 2>/dev/null]
nfsclient
members solaris
no_usr_local // no NFS crossmounted /usr/local on these machines
members linux
#verbatim <systems/no_usr_local_systems.cfg> [/pikt/bin/piktc -xI +C "=lld
/usr/local/etc/tmp 2>&1 | =grep -i 'no such' >/dev/null &&
=hostname" +H solaris -H downsys]
usr_local
members nonno_usr_local
no_opt_local // no NFS crossmounted /opt/local on these machines
members linux
opt_local
members nonno_opt_local
///////////////////////////////////////////////////////////////////////////////
// network hostgroups
local // sharing the same network segment with the piktmaster
members
#verbatim <systems/local_systems.cfg> [/pikt/bin/piktc -xI +C "=ifconfig -a |
=grep 123.111.130 >/dev/null && =hostname" -H downsys 2>/dev/null]
baksubnet // sharing the machine room bak subnet
members
#verbatim <systems/baksubnet_systems.cfg> [/pikt/bin/piktc -xI +C "=ifconfig -a |
=grep 192.168.0 >/dev/null && =hostname" -H downsys 2>/dev/null]
///////////////////////////////////////////////////////////////////////////////
// special-function hostgroups
nosendmail
members kiev kiev2 athens2 athens4 warsaw vienna berlin
berlin2 nantes milan brussels madrid
paris4 paris5 paris6 paris7 paris8
calais2 // calais
murmansk firenze cologne leiden copenhagen calais
crem
members madrid kiev kiev2 paris4 paris5 paris6 paris7 paris8
naples // kiev3
kbt
members // empty
///////////////////////////////////////////////////////////////////////////////
// files and/or process management hostgroups
sudo
members
#verbatim <systems/sudo_systems.cfg> [/pikt/bin/piktc -xI +C "=ls /etc/sudoers
2>/dev/null | =grep sudoers >/dev/null && =hostname" -H downsys
2>/dev/null]
tcpd
members
firenze
#verbatim <systems/tcpd_systems.cfg> [/pikt/bin/piktc -xI +C "=grep tcpd
/etc/inetd.conf | =grep -v '^#'>/dev/null &&
=hostname" -H downsys 2>/dev/null]
ntpd
members
#verbatim <systems/ntpd_systems.cfg>
[/pikt/bin/piktc -xI +C "=psall | =grep ntpd |
=egrep -v ' piktc|grep' >/dev/null &&
=ls /etc/ntp.conf 2>&1 |
=grep -iv 'no such' >/dev/null &&
=hostname" -H downsys 2>/dev/null]
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// pikt admin hostgroups
///////////////////////////////////////////////////////////////////////////////
newsys // set '-D doexec +D verbose' for these (or just
// set these in defines.cfg accordingly)
members davao
//cadiz trondheim
//firenze
///////////////////////////////////////////////////////////////////////////////
testsys // set '+D debug' for these (or just
// set this in defines.cfg accordingly)
members davao
// piktmaster
///////////////////////////////////////////////////////////////////////////////
sicksys // set '-H sicksys' for these
members
#verbatim <systems/sicksys_systems.cfg>
///////////////////////////////////////////////////////////////////////////////
[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.
|