Init Section
(NOTE: Some of the techniques shown or described on this page--marked in purple--require new features in the latest official PIKT 1.19.0 release (pikt-current.tar.gz) that are unavailable in any previous version.)
After the script identifier, an init section usually follows. In the init section, you prepare the groundwork for subsequent script actions.
For example, here is a typical init section, from a script named RunawayCPUProcs:
init status active level urgent task "Report runaway processes using a high % of the CPU" input proc "=psls | =trim(160) | =awk '\$3>=80.0'" filter "=egrep '^[A-Za-z0-9\-]+[ ]+[0-9]+ ' | =zapinterpreters" dat $PID 2 dat #cpu 3 dat #mem 4 dat $sta 9 dat $tim 10 dat $prc 11 keys $PIDThe general format of the init section is:
init status active|inactive|suspended| testing|debugging level emergency|urgent|critical| error|warning|notice| info|debug task "