/[omni_gantt]/omni2db.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /omni2db.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Wed Sep 11 16:41:00 2002 UTC revision 1.2 by dpavlin, Wed Sep 11 18:11:07 2002 UTC
# Line 18  sub db { Line 18  sub db {
18                  user_group_host='".$omni{'User.Group@Host'}."' and                  user_group_host='".$omni{'User.Group@Host'}."' and
19                  specification='$omni{Backup_Specification}'");                  specification='$omni{Backup_Specification}'");
20    
21            print "rv: $rv\n" if ($debug);
22    
23          $dbh->do ("insert into gantt (sessionid,type,status,          $dbh->do ("insert into gantt (sessionid,type,status,
24                  user_group_host,specification) values                  user_group_host,specification) values
25                  ('$omni{SessionID}','$omni{Session_type}',                  ('$omni{SessionID}','$omni{Session_type}',
26                  '$omni{Session_status}',                  '$omni{Session_status}',
27                  '".$omni{'User.Group@Host'}."',                  '".$omni{'User.Group@Host'}."',
28                  '$omni{Backup_Specification}')") if ($rv eq "0E0");                  '$omni{Backup_Specification}')") if ($rv eq "0E0" || !$rv);
29  }  }
30    
31  open(O, "/usr/omni/bin/omnistat -detail |") || die "omnistat: $!";  open(O, "/usr/omni/bin/omnistat -detail |") || die "omnistat: $!";
32  while(<O>) {  while(<O>) {
33          chomp;          chomp;
34          if (/^$/) {          if (/^$/) {
35                  db() if (scalar keys %omni == 4);                  db() if (scalar keys %omni == 6);
36                  %omni = ();                  %omni = ();
37                  print "------------\n" if ($debug);                  print "------------\n" if ($debug);
38                  next;                  next;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26