Bumped 'Exhaust Temp' jump threshold to 30c in scan-ipmitool.

Adjusted some logging.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 2 years ago
parent 03f0cdad84
commit 13b0f5bdcc
  1. 5
      Anvil/Tools/Storage.pm
  2. 5
      scancore-agents/scan-ipmitool/scan-ipmitool
  3. 13
      tools/anvil-manage-files

@ -5297,8 +5297,9 @@ sub _wait_if_changing
sleep $delay; sleep $delay;
my $new_size = (stat($file))[7]; my $new_size = (stat($file))[7];
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
file => $file, 's1:file' => $file,
last_size => $last_size." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $last_size}).")", 's2:new_size' => $new_size." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $new_size}).")",
's3:last_size' => $last_size." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $last_size}).")",
}}); }});
if ($new_size == $last_size) if ($new_size == $last_size)
{ {

@ -180,10 +180,13 @@ $anvil->data->{'scan-ipmitool'} = {
'RAID Controller' => { 'RAID Controller' => {
jump => 15, jump => 15,
}, },
# On Dells, 'Temp (xxh)' change a lot, so we bump the jump. # On Dells, 'Temp (xxh)' and 'Exhaust Temp' change a lot, so we bump the jump.
'Temp' => { 'Temp' => {
jump => 30, jump => 30,
}, },
'Exhaust Temp' => {
jump => 30,
},
}, },
# TODO: Remove this and have Striker pull the list of thermal sensors read in the # TODO: Remove this and have Striker pull the list of thermal sensors read in the
# last $timestamp. # last $timestamp.

@ -500,7 +500,7 @@ sub check_incoming
# Read any files in '/mnt/shared/incoming'. # Read any files in '/mnt/shared/incoming'.
$anvil->Storage->scan_directory({ $anvil->Storage->scan_directory({
debug => 3, debug => 2,
directory => $anvil->data->{path}{directories}{shared}{base}, directory => $anvil->data->{path}{directories}{shared}{base},
recursive => 1, recursive => 1,
}); });
@ -527,7 +527,7 @@ sub check_incoming
# Skip if this isn't a file. # Skip if this isn't a file.
my $file_type = $anvil->data->{scan}{directories}{$full_path}{type}; my $file_type = $anvil->data->{scan}{directories}{$full_path}{type};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
full_path => $full_path, full_path => $full_path,
file_type => $file_type, file_type => $file_type,
}}); }});
@ -542,7 +542,7 @@ sub check_incoming
my $say_mimetype = convert_mimetype($anvil, $file_mimetype, $full_path, $file_executable); my $say_mimetype = convert_mimetype($anvil, $file_mimetype, $full_path, $file_executable);
my $full_path = $file_directory."/".$file_name; my $full_path = $file_directory."/".$file_name;
$full_path =~ s/\/\//\//g; $full_path =~ s/\/\//\//g;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
file_name => $file_name, file_name => $file_name,
file_size => $file_size, file_size => $file_size,
file_mtime => $file_mtime, file_mtime => $file_mtime,
@ -554,7 +554,7 @@ sub check_incoming
# Do I know about this file? If so, is the file the same size? If either is no, calculate the md5sum. # Do I know about this file? If so, is the file the same size? If either is no, calculate the md5sum.
my ($file_uuid, $recorded_size, $recorded_mtime, $recorded_md5sum) = get_file_db_info($anvil, "", $file_name); my ($file_uuid, $recorded_size, $recorded_mtime, $recorded_md5sum) = get_file_db_info($anvil, "", $file_name);
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
file_uuid => $file_uuid, file_uuid => $file_uuid,
recorded_size => $recorded_size, recorded_size => $recorded_size,
recorded_mtime => $recorded_mtime, recorded_mtime => $recorded_mtime,
@ -727,9 +727,10 @@ WHERE
{ {
$query .= " file_name = ".$anvil->Database->quote($file_name)."\n"; $query .= " file_name = ".$anvil->Database->quote($file_name)."\n";
} }
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { query => $query }});
my $results = $anvil->Database->query({query => $query, source => $THIS_FILE, line => __LINE__}); my $results = $anvil->Database->query({query => $query, source => $THIS_FILE, line => __LINE__});
my $count = @{$results}; my $count = @{$results};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
results => $results, results => $results,
count => $count, count => $count,
}}); }});
@ -742,7 +743,7 @@ WHERE
my $file_size = defined $results->[0]->[1] ? $results->[0]->[1] : 0; my $file_size = defined $results->[0]->[1] ? $results->[0]->[1] : 0;
my $file_mtime = defined $results->[0]->[2] ? $results->[0]->[2] : 0; my $file_mtime = defined $results->[0]->[2] ? $results->[0]->[2] : 0;
$file_md5sum = defined $results->[0]->[3] ? $results->[0]->[3] : ""; $file_md5sum = defined $results->[0]->[3] ? $results->[0]->[3] : "";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
file_uuid => $file_uuid, file_uuid => $file_uuid,
file_size => $file_size, file_size => $file_size,
file_mtime => $file_mtime, file_mtime => $file_mtime,

Loading…
Cancel
Save