Changeset 42819
- Timestamp:
- May 8, 2025, 4:08:38 PM (12 months ago)
- Location:
- branches/eam_branches/ipp-20230313/ippMonitor
- Files:
-
- 11 edited
- 2 copied
-
. (modified) (1 prop)
-
INSTALL (modified) (1 diff)
-
Makefile.in (modified) (1 diff)
-
czartool/czarpoll.pl (modified) (2 diffs)
-
czartool/czartool/Nebulous.pm (modified) (1 diff)
-
czartool/czartool/Pantasks.pm (modified) (3 diffs)
-
czartool/extra_labels.dat (modified) (1 diff)
-
raw/czartool_labels.php (modified) (2 diffs)
-
raw/dataquality.php (copied) (copied from trunk/ippMonitor/raw/dataquality.php )
-
raw/ipp.czar.dat (modified) (1 diff)
-
raw/ipp.php (modified) (1 diff)
-
raw/pointing.php (copied) (copied from trunk/ippMonitor/raw/pointing.php )
-
scripts/czartool_getServerStatus.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20230313/ippMonitor
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-ppmerge-20241229/ippMonitor (added) merged: 42803 /trunk/ippMonitor merged: 42790-42791,42794-42795,42798,42806
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20230313/ippMonitor/INSTALL
r42546 r42819 39 39 # $CZARPLOTDIR and $METRICSPLOTDIR will be generated as links in the same folder as ippMonitor 40 40 # the structure of the names for these two directories are defined in Makefile.in a 41 psconfigure --htdocs /var/www/localhost/htdocs --wwwbin /var/www/localhost/wwwbin --pltdir /some/path --site ~/ippconfig/ippmonitor.config --usePDO 41 42 # pltdir is for ippMetrics and czartool_plots hyperlinked from /export/ipp113.0/ipp/ in /var/www/localhost/htdocs/ippMonitor 43 # pltdir in ipp117 is /var/www/localhost/htdocs/ippMonitor 44 # ippMetrics -> /export/ipp113.0/ipp/ippMetrics/ 45 # czartool_plots -> /export/ipp113.0/ipp/czartool_plots/ 46 # --usePDO selects a modern PHP/mysql interface 47 psconfigure --htdocs /var/www/localhost/htdocs --wwwbin /var/www/localhost/wwwbin --pltdir /var/www/localhost/htdocs/ippMonitor --site ~/ippconfig/ippmonitor.config --usePDO 42 48 43 49 # note that modern php requires the use of PDO, the older MDB2 and DB mysql interfaces have been deprecated -
branches/eam_branches/ipp-20230313/ippMonitor/Makefile.in
r42751 r42819 91 91 $(DESTWWW)/scatterPlotAirmassMcal.php \ 92 92 $(DESTWWW)/scatterPlotDataQuality.php \ 93 $(DESTWWW)/dataquality.php \ 94 $(DESTWWW)/pointing.php \ 93 95 $(DESTWWW)/loader.js 94 96 -
branches/eam_branches/ipp-20230313/ippMonitor/czartool/czarpoll.pl
r41302 r42819 380 380 } 381 381 382 # check ippdb host IPP-2338 383 print "* Checking ippdb hosts\n"; 384 my @hosts = qw(ipphome0 ipphome1 ippdb01 ippdb05 ippdb06 ippdb09 ippdb11 ippdb12 ippdb13 ippdb14); 385 if($dbupdate == 1) {check_disk_usage_and_update($czarDb, @hosts);} 386 382 387 # check pantasks status 383 388 if($dbupdate == 1) {updateServerStatus();} … … 604 609 } 605 610 611 ########################################################################### 612 # 613 # Loops through given host and update to the host list 614 # 615 ########################################################################### 616 sub check_disk_usage_and_update { 617 my ($czarDb, @hosts) = @_; 618 619 foreach my $host (@hosts) { 620 print "Checking $host...\n"; 621 622 for my $suffix (0, 1) { 623 my $mount_point = "/export/$host.$suffix"; 624 625 # Use SSH to get disk stats 626 my $df_output = `ssh $host df -k $mount_point 2>/dev/null`; 627 628 #if (!$df_output || $df_output !~ /\d/) { 629 # warn "Failed to get disk usage for $host on $mount_point\n"; 630 # next; 631 #} 632 633 my @lines = split /\n/, $df_output; 634 my $line = $lines[1] || next; 635 636 my ($filesystem, $blocks, $used, $available, $percent, $mount) = split /\s+/, $line; 637 638 # Convert KB to TB 639 my $total_tb = sprintf("%.1f", $blocks / 1024 / 1024 / 1024); 640 my $used_tb = sprintf("%.1f", $used / 1024 / 1024 / 1024); 641 my $available_tb = sprintf("%.1f", $available / 1024 / 1024 / 1024); 642 643 my $used_percent = sprintf("%.3f", $used / $blocks * 100); 644 my $available_percent = sprintf("%.3f", $available / $blocks * 100); 645 646 my $readable = 1; 647 my $writable = 1; 648 649 #print "Mount $mount_point: total=${total_tb}TB, used=${used_tb}TB (${used_percent}%), available=${available_tb}TB (${available_percent}%)\n"; 650 651 # Example: ippdb01.0(3.5T) 652 my $host_label = "$host.$suffix(${total_tb}T)"; 653 $czarDb->updateHost($host_label, 100, $available_percent, $used_percent, $readable, $writable); 654 } 655 } 656 } -
branches/eam_branches/ipp-20230313/ippMonitor/czartool/czartool/Nebulous.pm
r39805 r42819 111 111 112 112 next; 113 } elsif (($line =~ m/(ipp[0-9]+ \.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i)||113 } elsif (($line =~ m/(ipp[0-9]+(?:_bck)?\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i)|| 114 114 ($line =~ m/(ippb[0-9]+\.[0-9]{1})\s.+[0-9]+\s+([0-9]+)\s+([0-9]+)\s+([0-9]+)%.*/i) 115 115 # these nodes are gone -
branches/eam_branches/ipp-20230313/ippMonitor/czartool/czartool/Pantasks.pm
r41558 r42819 10 10 "cleanup", 11 11 "distribution", 12 " pstamp",12 "ippitc:pstamp", 13 13 "registration", 14 14 "stack", … … 22 22 "ippqub:stdscience_ws", 23 23 "ippqub2:stdscience_ws", 24 "ippsky:stdscience_ipp138", 24 25 "publishing", 25 26 "replication", … … 27 28 ); 28 29 # current home dir of gpc1 and gpc2 29 my $ipphome1 = "/home/panstarrs/ipp itc";30 my $ipphome1 = "/home/panstarrs/ippps1"; 30 31 my $ipphome2 = "/home/panstarrs/ippps2"; 31 32 -
branches/eam_branches/ipp-20230313/ippMonitor/czartool/extra_labels.dat
r41125 r42819 1 1 ## TdB20190626: add extra labels for processing in this file. Syntax is as follows: [labelname] [telescope] 2 2 ## Priorities for the labels must be added to the priorities mySQL table for the relevant telescope, if desired. 3 PV3.Pole.Reprocess.20180510 gpc13 ## PV3.Pole.Reprocess.20180510 gpc1 4 4 ps_ud_QUB gpc1 5 ## update.ipp138.fix gpc1 6 ## update.ipp138.fix gpc2 -
branches/eam_branches/ipp-20230313/ippMonitor/raw/czartool_labels.php
r42751 r42819 87 87 "distribution", 88 88 "ippqub:stdscience_ws", 89 " pstamp",89 "ippitc:pstamp", 90 90 "registration", 91 91 // "stack", … … 1668 1668 $qry = $db->query($sql); 1669 1669 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 1670 1671 // Set environment variables 1672 putenv("PATH=/usr/local/bin:/usr/bin:/bin:/data/ippc65.0/ipp/src/psconfig//ipp-20210708-gentoo.lin64/bin"); 1673 putenv("PERL5LIB=/data/ippc65.0/ipp/src/psconfig//ipp-20210708-gentoo.lin64/lib"); 1674 1670 1675 # not sure why neb-host doesn't work on ipp113 CCL.20210216 1671 1676 exec("neb-host |cut -b 17-30,86-", $hostnoteall); -
branches/eam_branches/ipp-20230313/ippMonitor/raw/ipp.czar.dat
r42276 r42819 5 5 menulink | menuselect | link | czartool | czartool_labels.php 6 6 menulink | menuselect | link | storage status | storage.php 7 menulink | menuselect | link | pointing | pointing.php 8 menulink | menuselect | link | data quality | dataquality.php 7 9 menulink | menuselect | link | mask stats | maskStats.php 8 10 menulink | menuselect | link | night summary | nightSummary.php -
branches/eam_branches/ipp-20230313/ippMonitor/raw/ipp.php
r42751 r42819 982 982 } 983 983 984 985 986 984 ?> -
branches/eam_branches/ipp-20230313/ippMonitor/scripts/czartool_getServerStatus.pl
r41726 r42819 19 19 20 20 if ($proj eq 'gpc1') { 21 $user = 'ipp itc';21 $user = 'ippps1'; 22 22 } else { 23 23 $user = 'ippps2'; 24 } 25 26 my @cmdOut3 = `grep PANTASKS_SERVER ~$user/$server/ptolemy.rc |grep -v std | grep -v PORT 2>&1`; 27 my $line3; 28 foreach $line3 (@cmdOut3) { 29 chomp($line3); 30 print "$line3 \n"; 24 31 } 25 32 … … 40 47 my @fields = split /\s+/, $line2; 41 48 49 42 50 # run job example 43 51 # field0 1 2 3 4 5 6 7 8 … … 50 58 $nline = $nline + 1; 51 59 } 60 61
Note:
See TracChangeset
for help on using the changeset viewer.
