NSA weekly operations status reports

From Nanuna internal
Jump to: navigation, search

The status reporting process

Every Friday, towards the end of the day, the UAF NSA Support Team informs the general ARM community of the operational status of the NSA systems at the Barrow and Oliktok sites. This task is carried out via the sending of a template-driven status reports to a mailing list hosted on the nanuna server. The list in question is called weekly (weekly AT nanuna.gi.alaska.edu) for the Barrow site and weekly-oli (weekly-oli AT nanuna.gi.alaska.edu) for the Oliktok site.

The team also maintains the mailing list (additions, deletions and updates). Please send email if you want to be added or removed.

The reporting process is similar for both sites. In the Dropbox/ARM_admin folder, there is a subfolder for Barrow/NSA: ARM_weekly, and there is a folder for Oliktok/AMF3: ARM_weekly_OLI. Inside those folders are similar tools, customized to each site. Change directory into each of those directories to create the respective report. The process is very similar for both.

The creation of the weeklies uses the script makereport.py and proceeds in three stages:

  1. update a JSON status database contained in the file Instruments.json (status command from within the makereport.py script)
  2. generate a text file containing the report is generated. The file name is the current date (YYYYMMDD) for Barrow/NSA and the current date with "-OLI" appended (YYYYMMDD-OLI) for the Oliktok/AMF3 site. The script also generates an email Subject: header for the status email and writes it out on the command line. Finally, the script prints the send-to address, customized for each site.
  3. manually paste the content of the generated report, the send-to address, and the Subject: line into a new email message and send it to the mailing list. What keeps the reports displaying the instrument and status lines in a nice column format is to drag the .txt file into a browser (Google Chrome, for example) so that it opens up in an html page. Then, copy and paste the contents of this html page into an email. When copying and pasting the report right from the .txt file into an email, the column can sometimes get displaced.

Practical tips for updating the instrument status

It is useful to use several tools, most of them web-based, in order to verify the status of each instrument as you go through the instrument list. A recommended list includes:

Steps to generate a new report via the makereport.py script

The actual report is generated via a Python script from a status file.

The ARM_weekly (Barrow) and ARM_weekly_OLI (Oliktok) folders inside the ARM_files shared folder contains the necessary source files for generating the new report. If you have the shared NSA Dropbox installed on a computer with Python (v. 2.x: 2.6 or later is recommended) available, carry out the following steps:

  1. Access the weekly reports folders. Remember there is a directory for Barrow and a separate directory for Oliktok. On a Mac, these are likely to be at ~/Dropbox/ARM_files/ARM_weekly/ (Barrow) and ~/Dropbox/ARM_files/ARM_weekly-OLI/ (Oliktok).
  2. Check that the files contained in it are current. There should be a text file with the name being the time stamp of the previous report date YYYYMMDD (Barrow) or YYYYMMDD-OLI (Oliktok) and a file called Instruments.json (a database of the latest instrument status information as well as the program makereport.py
  3. Run the command python makereport.py. This will give you a command shell to interactively edit the status database and generate a new report. You have the following commands at your disposal, which should be run in order:
    • reportdate — set report start and enddate:
      • Set report start date by entering it in the format YYYY-MM-DD or hit Return to accept the suggested start date (the previous Friday)
      • Set report end date by entering it in the format YYYY-MM-DD or hit Return to accept the suggested end date (the upcoming Friday)
    • status — interactively edit the Instruments.json file. At the end of editing, the new Instruments.json file is written to disk. You have the following commands at your disposal:
      • n: go to next instrument
      • s: enter new status for current instrument
      • u: add a single status update
      • d [n]: delete the status update number n for current instrument
      • e [n]: edit the status update number n for current instrument
      • break: skip all other instruments and leave status editing mode (writes Instruments.json to file)
    • writereport — write new report to file. The filename will be the current date's datestamp YYYYMMDD (Barrow) or YYYYMMDD-OLI (Oliktok)
    • exit or CTRL-D — quit the command shell
    • help — print a list of available commands.
  4. After proof-reading the report, copy new report file, the suggested subject, and the suggested send-to address, into an email message and send.
Personal tools