Help answer threads with 0 replies.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 04-27-2009, 12:37 PM   #1
LQ Newbie
Registered: Feb 2006
Posts: 27

Rep: Reputation: 15
RHEL5 - Modify /usr/bin/script to include flushtime attribute

I am wanting to use the /usr/bin/script binary to log my users' sessions. It is working well, however if a user disconnects their session without logging out properly, anything in the buffer that has not yet been written to file is lost.

I have been searching for different versions of this program, and it seems that on most BSD distros there is a "flushtime" attribute on the -t switch that allows you to set how often the buffer is written to file. I think this would be a good fix, but that option doesn't exist in the version on RHEL or Fedora. There is a -t flag, but all it does is add date/time stamps to the log file. There is also a -f flush switch on RHEL but I have been unsuccessful with it so far.

Does anyone have any suggestions on replacing the /usr/bin/script program with one from another distro? Or perhaps recompiling/reinstalling? I have tried just simply compiling one of the BSD versions of script.c on my box but I am not that familiar with C and it spits out a bunch of errors that I do not understand. Any help would be greatly appreciated. Thanks!!
Old 04-27-2009, 06:54 PM   #2
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Instead of 'script' check out 'rootsh'?
Old 04-28-2009, 12:12 PM   #3
LQ Newbie
Registered: Feb 2006
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks! That may work. I am trying it now. It seems to log pretty close to real time, and it seems to close cleanly when I close a session without exiting properly. It's nice that it appends the word "closed" to the end of a log file when the session is exited properly, that way I can see who is doing that and who isn't. This was a great tip and I will let you know asap how it goes.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 01:08 AM
cluster on rhel5 make giving error /usr/bin/ld: cannot find -ldlm xxx_anuj_xxx Linux - Software 3 05-18-2008 11:15 AM
which headers usr/include/ or /usr/include/nptl/? Chris.Rector Linux - Enterprise 0 02-02-2007 02:40 PM
cant modify /usr/local/bin folder surgey Linux - Newbie 4 05-10-2005 06:52 PM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 02:02 AM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration