RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 |
Rexter
Member
2012-Sep-20 6:47 pm
See evey terminal command passed by the GUII'd like to have a widget on my desktop, that logs, and scrolls every terminal command that is passed by the gui. Can Conky do this. Any other ideas? |
|
|
guicli
Anon
2012-Sep-20 7:22 pm
What makes you think the gui is passing commands to the cli? |
|
|
I think he wants to trace which programs are launched, with which switches and with which indirections. While technically not CLI, It could make sense. I don't think it is possible without patching the system. Not everything launched touches a shell, be it non-interactive even. |
|
|
|
to Rexter
Check what accounting options are available for your system. In opensuse 12.2, I see that there is a package called "acct". The documentation says quote: acct - User-Specific Process Accounting
This package contains the programs necessary for user-specific process accounting: sa, accton, and lastcomm.
I'm pretty sure that is what you want. I don't have it installed. I do remember using it on an earlier unix system (around 1990). Note that it will provide information all all commands used, not just those started from the GUI. |
|
RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 |
to Black Box
Yea, basically. Launchers, for example pass commands. When I click restart, or shutdown, a command is passed. My understanding is on Linux system most gui items pass commands. I just want them to log, and have then scroll. |
|
JohnInSJ Premium Member join:2003-09-22 Aptos, CA
1 recommendation |
JohnInSJ
Premium Member
2012-Sep-21 9:00 am
said by Rexter:Yea, basically. Launchers, for example pass commands. When I click restart, or shutdown, a command is passed. My understanding is on Linux system most gui items pass commands. I just want them to log, and have then scroll. Well, there's your problem. Your understanding is wrong. Everything a command line application does is accomplished via system calls. Those same system calls are also used by GUI apps. Want to rm files? call unlink() in your native gui or command line app. You could trace all syscalls, but that would get ugly fast. |
|
BranoI hate Vogons MVM join:2002-06-25 Burlington, ON
1 recommendation |
to Rexter
You could see standard output and errors when you launch a GUI app from terminal and leave the terminal open. This is sometime useful for troubleshooting. Most apps are quite chatty with status messages to stdout and/or stderr. |
|
RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 |
Rexter
Member
2012-Sep-21 9:41 am
Yea, that's what brought on the idea. I basically want that, but for everything not just one program. |
|
Rexter |
to JohnInSJ
said by JohnInSJ:You could trace all syscalls, but that would get ugly fast. Ugly is good. That sounds like what I want. |
|
BranoI hate Vogons MVM join:2002-06-25 Burlington, ON (Software) OPNsense Ubiquiti UniFi UAP-AC-PRO Ubiquiti NanoBeam M5 16
|
to Rexter
I'd direct your attention to /var/log/ directory. There you can see most of the system logs and messages.
You can watch 'live' a log file with tail command, i.e. tail -f /var/log/messages
If you turn on accounting it can be pretty detailed. |
|
XCOMdigitalnUll Premium Member join:2002-06-10 Spring, TX |
XCOM to Rexter
Premium Member
2012-Sep-23 12:04 am
to Rexter
conky to watch the processes and or logs? |
|
RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 1 edit |
to Brano
You can watch 'live' a log file with tail command, i.e. tail -f /var/log/messages
I opened a terminal, and entered this command. Then by the gui, I opened, played around, and then closed several apps. No information showed up in the terminal, under the said command. How do you turn on accounting? |
|
Rexter |
to XCOM
Yea, what Brano is describing sounds like what I want, but I'd like it to be scrolling in a semi-transparent windows on the desktop. I was wondering if Conky might be able to do that. |
|
XCOMdigitalnUll Premium Member join:2002-06-10 Spring, TX |
XCOM
Premium Member
2012-Sep-24 10:29 am
Yes it can. |
|
RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 |
Rexter
Member
2012-Sep-24 11:26 am
lol, typical RTFM linux guy. I'll spend some more time with my buddy Google. As of now, I haven't found the log info I'm looking for, to even import into Conky, so I'm not quite there yet. |
|
BranoI hate Vogons MVM join:2002-06-25 Burlington, ON |
Brano
MVM
2012-Sep-24 11:29 am
What exactly are you looking for? Different programs log to different log files (most of the log files are in /var/log though). |
|
XCOMdigitalnUll Premium Member join:2002-06-10 Spring, TX (Software) pfSense MikroTik CRS125-24G-1S-RM
1 recommendation |
XCOM to Rexter
Premium Member
2012-Sep-24 11:49 am
to Rexter
said by Rexter:lol, typical RTFM linux guy. I'll spend some more time with my buddy Google.
As of now, I haven't found the log info I'm looking for, to even import into Conky, so I'm not quite there yet. I am sorry wtf did you wanted? All I said was that yest it can be done... Give me some time to get out from work and I can assist but as it's been replayed here you need to cat the messages file and outputted to conky. |
|
XCOM |
XCOM to Rexter
Premium Member
2012-Sep-24 11:50 am
to Rexter
said by Rexter:How do you turn on accounting? As in "user" accounting? |
|
BranoI hate Vogons MVM join:2002-06-25 Burlington, ON |
Brano
MVM
2012-Sep-24 11:53 am
On most systems it's the acct package. |
|
XCOMdigitalnUll Premium Member join:2002-06-10 Spring, TX (Software) pfSense MikroTik CRS125-24G-1S-RM
|
to Rexter
ok so back at this.... Ok if you are trying to see every command done in cli by a user thats going to be a bit tricky. You will have to audit each user by using something like rootsh or as said by Bruno acct. To pipe it to conky all you have to do is something like execi lastcomm username Last User Command :
${execi lastcomm username | tail}
Not perfect but gives you an idea. Good Luck |
|
XCOM |
XCOM to Rexter
Premium Member
2012-Sep-26 10:05 pm
to Rexter
So..... What's the outcome? |
|
RexterLibertas, Aequitas, Veritas join:2002-11-17 cloud 9 |
Rexter
Member
2012-Sep-27 1:39 pm
I didn't find any info in /var/log/messages, and I didn't find a way to log all syscalls. |
|