Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I use a terminal logging method on my Ubuntu Desktop for the GNOME-terminal (it's good when I use SSH in GNOME-terminal):

Implementation

  1. As root:

    apt-get install bsdutils
    
  2. As the normal user:

    mkdir ~/logs
    
  3. append this to your ~/.bashrc - must be the last line!

    STARTTIME=`date +%F-%Hh-%Mm-%Ss-%N`; script -q -t 2>    \
      /home/USERNAMEHERE/logs/$STARTTIME-timing.txt         \
      -c 'bash --rcfile /home/USERNAMEHERE/.bashrc-cp'      \
      -f /home/USERNAMEHERE/logs/$STARTTIME-log.txt; exit 0
    
  4. make sure the 1) is the last line of bashrc, then [this is needed to avoid "fork bomb"..]:

    sed -e '$d' /home/USERNAMEHERE/.bashrc > /home/USERNAMEHERE/.bashrc-cp
    

Replay

Rename the filenames to you're needs! You can only play 1 file at one time.

    scriptreplay "/home/USERNAMEHERE/logs/$STARTTIME-timing.txt" \
                 "/home/USERNAMEHERE/logs/$STARTTIME-log.txt"

With this method I can log steps in ncurses menu, great! It's working perfectly.

Question

I need this great terminal logging method in putty too. How can I do that? (so for ex.: I need to log smitty menus on AIX machines with putty too.)

p.s.: Coul my logging method be better? (Can anyone update it?)

share|improve this question
    
I do not understand the problem. You approach should work also on AIX. –  andcoz Apr 30 '12 at 11:55
    
The question is that I need a logging solution for putty on windows, as the same as the one that I described. –  LanceBaynes May 1 '12 at 9:44
    
PuTTY itself can log, but can't replay the logs. –  sendmoreinfo Jan 30 '13 at 22:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.