検索条件
全3件
(1/1ページ)
72行目:
rsum += $7; osum += $10;
→ rsum += $8; osum += $11;
87行目と88行目:
print "rbytes.value", $7;
print "obytes.value", $10;
→ print "rbytes.value", $8;
print "obytes.value", $11;
--- plugins/node.d.freebsd/if_.in.orig 2009-12-30 13:55:55.000000000 +0100
+++ plugins/node.d.freebsd/if_.in 2010-02-24 18:59:15.670282185 +0100
@@ -81,9 +81,12 @@
if (NF == 10) {
print "rbytes.value", $6;
print "obytes.value", $9;
- } else {
+ } else if (NF == 11) {
print "rbytes.value", $7;
print "obytes.value", $10;
+ } else {
+ print "rbytes.value", $8;
+ print "obytes.value", $11;
}
}'
fi
--- plugins/node.d.freebsd/if_errcoll_.in.orig 2009-12-30 13:55:55.000000000 +0100
+++ plugins/node.d.freebsd/if_errcoll_.in 2010-02-24 19:00:26.026407278 +0100
@@ -59,9 +59,13 @@
print "ierrors.value", $5;
print "oerrors.value", $8;
print "collisions.value", $10;
- } else {
+ } else if (NF == 11) {
print "ierrors.value", $6;
print "oerrors.value", $9;
print "collisions.value", $11;
+ } else {
+ print "ierrors.value", $6;
+ print "oerrors.value", $10;
+ print "collisions.value", $12;
}
}}'
powerd_enable="YES"
% sysctl -a dev.cpu.0.freq
use IO::Socket; unlink "/tmp/mysock"; $server = IO::Socket::UNIX->new(LocalAddr => "/tmp/mysock", Type => SOCK_DGRAM, Listen => 5 ) or die $@; $client = IO::Socket::UNIX->new(PeerAddr => "/tmp/mysock", Type => SOCK_DGRAM, Timeout => 10 ) or die $@;しかし、はっきり言って騙されました。 見かけ上は起動するけれど、実際はソケットファイルが作成されないです。 これが、現行で正しい例:
use IO::Socket my $socket_path = '/tmp/wibble'; unlink($socket_path); my $server = IO::Socket::UNIX->new( Type => SOCK_STREAM, Local => $socket_path, Listen => 5 ) or die("Can't create server socket: $!\n"); my $sock = $server->accept() or die("Can't accept connection: $!\n"); my $client = IO::Socket::UNIX->new( Type => SOCK_STREAM, Peer => $socket_path, ) or die("Can't connect to server: $!\n");LocalAddr ではなく Local 、 PeerAddr ではなく、Peer です。