0byt3m1n1
Path:
/
data
/
16
/
.snapshot
/
daily.2025-03-10_0010
/
inventory
/
ARCHIVE
/
[
Home
]
File: vux_htscan_start.pl
#!/usr/local/bin/perl $host = `hostname`; chomp($host); $listdir = "/data/16/inventory/HTLISTS"; $host =~ s/vux//; exit if ($host == 17); $index = $host % 3; $dataset = (($host + (3 - $index))/3) if (($index == 1) || ($index == 2)); $dataset = ($host/3) if ($index == 0); $dataset = 0 if ($host == 63); $dataset = 0 if ($host == 61); $dataset = 0 if ($host == 62); $dataset = 6 if ($host == 65); exit if ($dataset > 20); #$dataset = 6 if ($host == 66); #$dataset = 6 if ($host == 65); exit if ($host > 66); #$index = 0 if ($index == 21); #$index = 23 if ($index == 17); #$index = 17 if ($index == 22); #$index = "nsoa" if ($index == 22); opendir(LISTDIR, $listdir); @DATAFILES = readdir(LISTDIR); closedir(LISTDIR); if ($index == 1) { $file1 = "data$dataset-aa-HTLIST.txt"; $file2 = "data$dataset-ab-HTLIST.txt"; $file3 = "data$dataset-ac-HTLIST.txt"; $file4 = "data$dataset-ad-HTLIST.txt"; $file5 = "data$dataset-ae-HTLIST.txt"; push(@DODATA, $file1); push(@DODATA, $file2); push(@DODATA, $file3); push(@DODATA, $file4); push(@DODATA, $file5); } if ($index == 2) { $file1 = "data$dataset-af-HTLIST.txt"; $file2 = "data$dataset-ag-HTLIST.txt"; $file3 = "data$dataset-ah-HTLIST.txt"; $file4 = "data$dataset-ai-HTLIST.txt"; $file5 = "data$dataset-aj-HTLIST.txt"; push(@DODATA, $file1); push(@DODATA, $file2); push(@DODATA, $file3); push(@DODATA, $file4); push(@DODATA, $file5); } if ($index == 0) { $file1 = "data$dataset-ak-HTLIST.txt"; $file2 = "data$dataset-al-HTLIST.txt"; $file3 = "data$dataset-am-HTLIST.txt"; $file4 = "data$dataset-an-HTLIST.txt"; $file5 = "data$dataset-ao-HTLIST.txt"; $file6 = "data$dataset-ap-HTLIST.txt"; push(@DODATA, $file1); push(@DODATA, $file2); push(@DODATA, $file3); push(@DODATA, $file4); push(@DODATA, $file5); push(@DODATA, $file6); } #foreach(@DATAFILES) { # $file = $_; # $test = "data$index-"; # push(@DODATA, $file) if ($file =~ /$test/); #} foreach(@DODATA) { $datafile = $_; $datafile = "/data/16/inventory/HTLISTS/$datafile"; chomp($datafile); $script = "/data/16/inventory/htscan.pl"; if (! fork) { setpgrp(0,$$); exec ("${script} ${datafile}"); } }