republican-creole
site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
1185
Share Topic
Posting?
Post a:
Post a:
Links: ·Forum FAQ ·Attitude Adjustment ·Linux docs ·DistroWatch ·OPLM
page: 1 · 2
AuthorAll Replies


Rexter
YeeHaw

join:2002-11-17
cloud 9

See evey terminal command passed by the GUI

I'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

@cox.net

What makes you think the gui is passing commands to the cli?



Black Box

join:2002-12-21

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.
--
Keep It Safe, Stupid!
Yes, I CanChat. Can You?



nwrickert
sand groper
Premium,MVM
join:2004-09-04
Geneva, IL
kudos:7
Reviews:
·AT&T U-Verse

reply 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.
--
AT&T Uverse; Zyxel NBG334W router (behind the 2wire gateway); openSuSE 12.2; firefox 15.0


Rexter
YeeHaw

join:2002-11-17
cloud 9

reply 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.
--
I'm with the Central Government. I'm here to help you. Now bend over, really, I'm helping you, just, just stay still. You'll feel better in a moment.



JohnInSJ
Premium
join:2003-09-22
San Jose, CA
Reviews:
·PHONE POWER
·Comcast

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.
--
My place : »www.schettino.us


Brano
I hate Vogons
Premium,MVM
join:2002-06-25
Burlington, ON
kudos:6

reply 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.



Rexter
YeeHaw

join:2002-11-17
cloud 9

Yea, that's what brought on the idea. I basically want that, but for everything not just one program.



Rexter
YeeHaw

join:2002-11-17
cloud 9

reply 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.
--
I'm with the Central Government. I'm here to help you. Now bend over, really, I'm helping you, just, just stay still. You'll feel better in a moment.


Brano
I hate Vogons
Premium,MVM
join:2002-06-25
Burlington, ON
kudos:6
Reviews:
·Bell Fibe

reply 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.



XCOM
digitalnUll
Premium
join:2002-06-10
Spring, TX

reply to Rexter
conky to watch the processes and or logs?
--
[nUll@dcypher ~]$



Rexter
YeeHaw

join:2002-11-17
cloud 9

1 edit

reply 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
YeeHaw

join:2002-11-17
cloud 9

reply 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.
--
I'm with the Central Government. I'm here to help you. Now bend over, really, I'm helping you, just, just stay still. You'll feel better in a moment.



XCOM
digitalnUll
Premium
join:2002-06-10
Spring, TX

Yes it can.



Rexter
YeeHaw

join:2002-11-17
cloud 9

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'm with the Central Government. I'm here to help you. Now bend over, really, I'm helping you, just, just stay still. You'll feel better in a moment.



Brano
I hate Vogons
Premium,MVM
join:2002-06-25
Burlington, ON
kudos:6

What exactly are you looking for? Different programs log to different log files (most of the log files are in /var/log though).



XCOM
digitalnUll
Premium
join:2002-06-10
Spring, TX
Reviews:
·flowroute
·Comcast
·voip.ms
·Callcentric
·SIPBRI

reply 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.
--
[nUll@dcypher ~]$


XCOM
digitalnUll
Premium
join:2002-06-10
Spring, TX
Reviews:
·flowroute
·Comcast
·voip.ms
·Callcentric
·SIPBRI

reply to Rexter

said by Rexter:

How do you turn on accounting?

As in "user" accounting?
--
[nUll@dcypher ~]$


Brano
I hate Vogons
Premium,MVM
join:2002-06-25
Burlington, ON
kudos:6

On most systems it's the acct package.



XCOM
digitalnUll
Premium
join:2002-06-10
Spring, TX
Reviews:
·flowroute
·Comcast
·voip.ms
·Callcentric
·SIPBRI

reply 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
--
[nUll@dcypher ~]$

Thursday, 20-Jun 05:23:59 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics