8dec52af54693d90ce81445579a5fb538321d7d8
[monitor.git] / automate_pl03.sh
1 #!/bin/bash
2
3 set -e
4 cd $HOME/monitor/
5
6 #########################
7 # 1. FINDBAD NODES 
8 rm -f pdb/production.findbad2.pkl
9 ./findbad.py --cachenodes --debug=0 --dbname="findbad2"
10
11 ########################
12 # COPY to golf for diagnose.py and action.py
13 cp pdb/production.findbad2.pkl pdb/production.findbad.pkl
14 scp pdb/production.findbad2.pkl soltesz@golf.cs.princeton.edu:monitor3/pdb/production.findbad.pkl
15
16 ########################
17 # COPY Act_all records
18 scp soltesz@golf.cs.princeton.edu:monitor3/pdb/production.act_all.pkl pdb/
19
20 ########################
21 # badcsv.txt
22 ./printbadcsv.py  | grep -v loading | tr -d ' ' > badcsv.txt
23 cp badcsv.txt /plc/data/var/www/html/monitor/
24
25 #########################
26 # 2. FINDBAD PCUS
27 rm -f pdb/production.findbadpcus2.pkl
28 ./findbadpcu.py --increment --refresh --debug=0 --dbname=findbadpcus2
29 # convert pkl to php serialize format.
30 ./pkl2php.py -i findbadpcus2 -o findbadpcus