Reports until 11:38, Tuesday 08 August 2017
H1 CDS
david.barker@LIGO.ORG - posted 11:38, Tuesday 08 August 2017 - last comment - 13:17, Tuesday 08 August 2017(38078)
operator command line text log program

Cheryl asked for a command line program to write operations logs to a text file. I have created a simple bash script called oplog

Here is the help page (printed if oplog is called with no arguments, or a single 'help' argument)

david.barker@zotws6: oplog help
Usage:
      oplog text to be entered into log file             | Simple text entry
      oplog 'text with non alpha-numberic characters'    | Complex text entry
      oplog help                                         | Show this help page
      oplog show                                         | Print content of your log file

Each user has their own log file, dated with the current day's date, in the /tmp/directory. The log file can be listed with the 'oplog show' command

oplog show
Aug 08 2017 18:03:12 UTC one two three four
Aug 08 2017 18:03:32 UTC five six seven eight
Aug 08 2017 18:13:26 UTC here is a long text line, it has many characters - including a dash
Aug 08 2017 18:17:31 UTC how about
Aug 08 2017 18:17:40 UTC how about & character?
Aug 08 2017 18:18:02 UTC show
Aug 08 2017 18:29:29 UTC
Aug 08 2017 18:32:28 UTC show the text
Aug 08 2017 18:33:18 UTC reboot h1fescript0

 

Comments related to this report
david.barker@LIGO.ORG - 13:17, Tuesday 08 August 2017 (38085)

following Ryan's excellent suggestion, the log file has been moved from the /tmp directory into the user's home directory as a 'dot' file, specifically from:

/tmp/<date>_<username>

to:

/ligo/home/username/.<date>_<username>