Get cmd name out of bash
Philipp Michael
Philipp.Michael@gmx.net
Mon Aug 18 14:50:00 GMT 2008
Sorry, my fault with the missing subject!
Hi,
i have a need to log the console inputs to a named pipe. so i checked the possibilities via systemtap. i want to get the processcall of the cmd which was typed and send this to named pipe where i can get it with the syslog-ng deamon. my problem now is, that i don`t get the command name like ls, ifconfig, or cd...
my little test program (below) shows only: bash (xxxx).... so is there a possibility to get the direct command names like the appear in the process list (ps -ef) ? can i go into the bash process list?
probe process.create { printf ("%s(%d) create done (%s)\n", execname(), pid(), argstr) }
probe process.exec { printf ("%s(%d) exec done (%s)\n", execname(), pid(), argstr) }
probe timer.ms (60000) {exit() }
thx
Philipp Michael
--
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03
--
Psssst! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03
More information about the Systemtap
mailing list