Hallo Weltall,
universe wrote:
> Wie erkennst Du mit netstat welcher daemon auf einem bestimmten port
> horcht?
ok, mit awk, netstat und fstat gehts :P
echo "foo" | \
awk '{
fstat="fstat";
netstat="netstat -aAnf inet";
i=0;
while ( (fstat | getline) >0 ) {
if( $0 ~ / internet/ ) {
fstatout[i] = sprintf("%s %d %s", $2, $3, $8 );
i++;
}
}
close(fstat);
while ( (netstat | getline) >0 ) {
netstatout[$1] = sprintf("%20s -> %s",$5, $6 );
}
close(netstat);
for( a=0 ; a<i ; a++ ) {
split(fstatout[a],fstatrow," ");
printf ("%-20s %-10s %s\n", fstatrow[1], fstatrow[2],
netstatout[fstatrow[3]]);
}
}'
> Wolfgang, Du willst wahrscheinlich "sockstat" ausfuehren, um
das ist doch langweilig....
Gruesse, Oliver
-- Oliver Lehmann, lehmann@ans-netz.de, http://www.pofo.de/ http://wishlist.pofo.de/ To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org with "unsubscribe de-bsd-questions" in the body of the messageReceived on Thu 28 Nov 2002 - 17:44:42 CET