This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Get cmd name out of bash
- From: "Philipp Michael" <Philipp dot Michael at gmx dot net>
- To: systemtap at sources dot redhat dot com
- Date: Mon, 18 Aug 2008 16:50:02 +0200
- Subject: Get cmd name out of bash
- References: <20080818143751.62240@gmx.net>
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