Nowwhat
19/11/2016, 18h28
Hummm.
De mémoire, 'sh' ne fait pas l'affaire, j'ai utilisé 'bash' (à l’époque):
De mémoire, 'sh' ne fait pas l'affaire, j'ai utilisé 'bash' (à l’époque):
root@ns311465:~/rtm# bash install_rtm.sh
--2014-10-30 09:53:36-- ftp://ftp.ovh.net/made-in-ovh/rtm/hddtemp.db
=> `/usr/share/misc/hddtemp.db'
Resolving ftp.ovh.net (ftp.ovh.net)... 213.186.33.9
Connecting to ftp.ovh.net (ftp.ovh.net)|213.186.33.9|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /made-in-ovh/rtm ... done.
==> SIZE hddtemp.db ... 20559
==> PASV ... done. ==> RETR hddtemp.db ... done.
Length: 20559 (20K) (unauthoritative)
100%[================================================== ================================================== =========>] 20,559 --.-K/s in 0s
2014-10-30 09:53:36 (80.2 MB/s) - `/usr/share/misc/hddtemp.db' saved [20559]
Found hddtemp version installed: 0.3-beta15. No new install needed.
--2014-10-30 09:53:36-- ftp://ftp.ovh.net/made-in-ovh/rtm/dmidecode-2.4.tar.gz
=> `dmidecode-2.4.tar.gz'
Resolving ftp.ovh.net (ftp.ovh.net)... 213.186.33.9
Connecting to ftp.ovh.net (ftp.ovh.net)|213.186.33.9|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /made-in-ovh/rtm ... done.
==> SIZE dmidecode-2.4.tar.gz ... 43171
==> PASV ... done. ==> RETR dmidecode-2.4.tar.gz ... done.
Length: 43171 (42K) (unauthoritative)
100%[================================================== ================================================== =========>] 43,171 --.-K/s in 0s
2014-10-30 09:53:36 (90.3 MB/s) - `dmidecode-2.4.tar.gz' saved [43171]
gcc -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -pedantic -DUSE_MMAP -O2 -c dmidecode.c -o dmidecode.o
gcc -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -pedantic -DUSE_MMAP -O2 -c util.c -o util.o
gcc dmidecode.o util.o -o dmidecode
gcc -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -pedantic -DUSE_MMAP -O2 -c biosdecode.c -o biosdecode.o
biosdecode.c: In function 'compaq_decode':
biosdecode.c:438:4: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat]
gcc biosdecode.o util.o -o biosdecode
gcc -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -pedantic -DUSE_MMAP -O2 -c ownership.c -o ownership.o
gcc ownership.o util.o -o ownership
gcc -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -pedantic -DUSE_MMAP -O2 -c vpddecode.c -o vpddecode.o
gcc vpddecode.o util.o -o vpddecode
install -m 755 dmidecode /usr/local/sbin
install -m 755 biosdecode /usr/local/sbin
install -m 755 ownership /usr/local/sbin
install -m 755 vpddecode /usr/local/sbin
install -m 644 man/dmidecode.8 /usr/local/man/man8
install -m 644 man/biosdecode.8 /usr/local/man/man8
install -m 644 man/ownership.8 /usr/local/man/man8
install -m 644 man/vpddecode.8 /usr/local/man/man8
Checking for lsiutil ...
Checking for mpt-status ...
Generating /usr/local/rtm/scripts/min/check.pl...
Generating /usr/local/rtm/scripts/daily/kernel.sh...
Generating /usr/local/rtm/scripts/daily/release.sh...
Generating /usr/local/rtm/scripts/min/usage.pl...
Generating /usr/local/rtm/scripts/min/usage-root.pl...
Generating /usr/local/rtm/scripts/hour/hwinfo.pl...
Generating /usr/local/rtm/scripts/hour/hwinfo-root.pl...
Generating /usr/local/rtm/scripts/min/hddinfo.pl...
Generating /usr/local/rtm/scripts/hour/smart.pl...
Generating /usr/local/rtm/scripts/hour/raid.pl...
Generating /usr/local/rtm/scripts/daily/raid-daily.pl...
Generating /usr/local/rtm/scripts/hour/listen_ports.pl...
Generating rtm-update-ip.pl...
Generating rtm.pl...
Crontab entries:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 1 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 1 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
*/1 * * * * root /usr/local/rtm/bin/rtm 25 > /dev/null 2> /dev/null
5 * * * * opendmarc /usr/sbin/opendmarc-importstats > /dev/null 2> /dev/null #Import /var/run/opendmarc/opendmarc.dat into database
Restarting CRON. Try 1
CRON restarted succefully.
NOTICE:
in /usr/local/rtm/scripts/min/check.pl you can add more check that you are interested to monitor. The form should be:
When everything is fine:
CHECK_vm|
CHECK_oops|
On error:
CHECK_vm|1
CHECK_oops|1
For example:
# /usr/local/rtm/scripts/min/check.pl
mCHECK_vm|
mCHECK_oops|
Sending all informations:
ls: cannot access /proc/ide: No such file or directory
rtm hINFO_uptime|2914078
rtm dINFO_RTM_version|0.9.4-3
rtm dHW_CPU_name|Intel(R) Xeon(R) CPU W3530 @ 2.80GHz
rtm dINFO_KERNEL_release|3.16.3local-5
rtm mINFO_PART_md2_mount|/
rtm dINFO_KERNEL_version|#6 SMP Fri Sep 26 17:23:02 CEST 2014
rtm mINFO_PART_md2_usage|34
rtm dINFO_RELEASE_os|Debian 7.7