LINUX.ORG.RU

Сообщения pztrn

 

check_mk_agent && freebsd 11.0-RELEASE

День добрый.

А есть тут те, кто мониторит фряхи с помощью check_mk? Победили ли вы как-то следующую проблему: при запросе данных от агента через telnet или при запуске check_mk_agent у меня обрезаются данные по процессам. В итоге выглядит это так:

<<<ps>>>
(root,0,4240,0.0) [kernel]
(root,5388,132,0.0) /sbin/init --
(root,0,16,0.0) [crypto]
(root,0,16,0.0) [crypto returns]
(root,0,32,0.0) [cam]
(root,0,128,0.0) [zfskern]
(root,0,16,0.0) [sctp_iterator]
(root,0,16,0.0) [rand_harvestq]
(root,0,16,0.0) [soaiod1]
(root,0,16,0.0) [soaiod2]
(root,0,16,0.0) [audit]
(root,0,64,391.9) [idle]
(root,0,352,0.0) [intr]
(root,0,48,0.0) [geom]
(root,0,320,0.0) [usb]
(root,0,16,0.0) [soaiod3]
(root,0,16,0.0) [soaiod4]
(root,0,32,0.0) [pagedaemon]
(root,0,16,0.0) [vmdaemon]
(root,0,16,0.0) [pagezero]
(root,0,16,0.0) [bufdaemon]
(root,0,16,0.0) [bufspacedaemon]
(root,0,16,0.0) [syncer]
(root,0,16,0.0) [vnlru]
(root,9512,616,0.0) /sbin/devd
(root,10472,988,0.0) /usr/sbin/syslogd -s
(root,20600,1256,0.0) sendmail: accepting connections (sendmail)
(smmsp,20600,712,0.0) sendmail: Queue runner@00:30:00 for /var/spo
(root,12564,468,0.0) /usr/sbin/cron -s
(root,55676,5348,0.0) /usr/sbin/sshd
(root,80356,25676,0.1) /usr/local/sbin/snmpd -p /var/run/net_snmpd.
(root,42364,6352,0.0) /usr/local/libexec/postfix/master -w
(postfix,44424,6192,0.0) pickup -l -t unix -u
(postfix,44476,6244,0.0) qmgr -l -t unix -u
(root,83092,6052,0.0) sshd: l2 [priv] (sshd)
(l2,83092,6124,0.0) sshd: l2@pts/2 (sshd)
(root,83092,6140,0.0) sshd: root@pts/3 (sshd)
(root,14680,2040,0.0) /usr/sbin/inetd -wW
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv0
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv1
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv2
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv3
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv4
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv5
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv6
(root,10460,648,0.0) /usr/libexec/getty Pc ttyv7
(l2,8129564,3519068,4.8) /usr/local/openjdk8/bin/java -Djava.util.log
(l2,1749376,177384,0.0) /usr/local/openjdk8/bin/java -Xms128m -Xmx25
(l2,25124,4636,0.0) -zsh (zsh)
(root,31612,5252,0.0) -zsh (zsh)
(root,13848,2552,0.0) /usr/local/bin/bash /usr/local/bin/check_mk_
(root,21164,2136,0.0) ps ax -o state,user,vsz,rss,pcpu,command

Причем такой вывод идет именно если запускать скрипт руками или же запрашивать данные через telnet. Если запустить ps руками:

ps ax -o state,user,vsz,rss,pcpu,command | sed -e 1d  -e '/\([^ ]*J\) */d' -e 's/ *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) */(\2,\3,\4,\5) /'

то все выводит хорошо и без обрезания.

 ,

pztrn
()

if DoctorSinus:=23; DoctorSinus < 100; DoctorSinus++ { fmt.Println(«Happy birthday!») }

Меж тем годному человеку синкрементировалось годков! С днем рождения, DoctorSinus!

 

pztrn
()

Синусоид синкрементировался

С днем рождения, DoctorSinus!

 , , ,

pztrn
()

RSS подписка на новые темы