This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Get cmd name out of bash


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]