Browse Source
add file to gather further system information the gnuish way...for now get the number of cpus
master
add file to gather further system information the gnuish way...for now get the number of cpus
master
7 changed files with 127 additions and 9 deletions
-
64cf-engine-classes.txt
-
22classes.sh
-
16gnu_information.sh
-
8run.sh
-
5system_information.sh
-
3test.sh
-
18utils.sh
@ -0,0 +1,64 @@ |
|||
127_0_0_1 |
|||
192_168_120_40 |
|||
2001_4ba0_ffff_138_1__400 |
|||
64_bit |
|||
8_cpus |
|||
?Day15 |
|||
?Evening |
|||
?GMT_Hr17 |
|||
?Hr18 |
|||
?Hr18_Q2 |
|||
?Lcycle_1 |
|||
?March |
|||
?Min15_20 |
|||
?Min17 |
|||
PK_MD5_1cc0a2b13599f57ebb17df5abdc45ae1 |
|||
?Q2 |
|||
?Saturday |
|||
?Yr2014 |
|||
agent |
|||
any |
|||
cfengine |
|||
cfengine_3 |
|||
cfengine_3_5 |
|||
cfengine_3_5_3 |
|||
community_edition |
|||
compiled_on_linux_gnu |
|||
cpu0_high |
|||
cpu1_high |
|||
cpu2_high |
|||
cpu3_high |
|||
cpu_high |
|||
diskfree_high_normal |
|||
entropy_misc_in_low |
|||
entropy_misc_out_low |
|||
entropy_postgresql_in_low |
|||
entropy_postgresql_out_low |
|||
fe80__14d8_4dff_fed7_9c59 |
|||
gentoo |
|||
inform_mode |
|||
ipv4_127 |
|||
ipv4_127_0 |
|||
ipv4_127_0_0 |
|||
ipv4_127_0_0_1 |
|||
ipv4_192 |
|||
ipv4_192_168 |
|||
ipv4_192_168_120 |
|||
ipv4_192_168_120_40 |
|||
ldap_out_high |
|||
linux |
|||
linux_3_12_8_hardened_r1 |
|||
linux_x86_64 |
|||
linux_x86_64_3_12_8_hardened_r1 |
|||
linux_x86_64_3_12_8_hardened_r1__4_SMP_Tue_Mar_4_17_38_20_CET_2014 |
|||
loadavg_low |
|||
localhost |
|||
mac_16_d8_4d_d7_9c_59 |
|||
net_iface_eth0 |
|||
net_iface_lo |
|||
rootprocs_high |
|||
ssh_in_high |
|||
test |
|||
users_high |
|||
verbose_mode |
|||
x86_64 |
|||
@ -0,0 +1,22 @@ |
|||
#!/bin/dash |
|||
|
|||
## |
|||
# This creates function that will gather some system informations |
|||
# and propagate them as environment variables. |
|||
# |
|||
|
|||
. ./utils.sh |
|||
include_once system_information.sh |
|||
include_once interface_information.sh |
|||
|
|||
has_class() { |
|||
if [ 1 -ne $# ] |
|||
then |
|||
logger -p syslog.err 'has_class: no class given' |
|||
exit 1 |
|||
fi |
|||
|
|||
test "${CLASSES}" != "${CLASSES%${1}*}" |
|||
} |
|||
|
|||
# vim: set ts=4 sw=4: |
|||
@ -0,0 +1,16 @@ |
|||
#!/bin/dash |
|||
|
|||
## |
|||
# This creates function that will gather some system informations |
|||
# and propagate them as environment variables. |
|||
# |
|||
|
|||
. ./utils.sh |
|||
include_once system_information.sh |
|||
|
|||
echo "foo ${NPROC}" |
|||
CPUS=$(${NPROC}) |
|||
|
|||
export CLASSES="${CLASSES}${CPUS}cpus " |
|||
|
|||
# vim: set ts=4 sw=4: |
|||
@ -0,0 +1,3 @@ |
|||
#!/bin/sh |
|||
|
|||
logger -i -p syslog.err $0: blubber |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue