Question
· Feb 8, 2016

Log csession in Linux

Hello,

I am trying to log the output of csession in Linux. I try this command:

csession cache | tee myoutput.log

Although it works each new lines at screen output doesn't appear at row 1...

Any tip?

Discussion (5)2
Log in or sign up to continue

You can use script command for that

script --quiet myoutput.log
csession cache
work in terminal
hang
exit

If you want to log every command then you can enable it in SMP ->  System Administration -> Security -> Auditing ->  Configure System Events. Once there enable %System/%DirectMode/DirectMode event and every terminal command would be logged along with time and user who executed it. Audit must also be active, of course.