Edit D:\app\Administrator\product\11.2.0\dbhome_1\sysman\admin\scripts\hoststorageUtil.pl
#!/usr/local/bin/perl # # $Header: emagent/sysman/admin/scripts/hoststorageUtil.pl /st_emagent_10.2.0.4.2db11.2/1 2008/10/13 23:03:32 rajverma Exp $ # # hoststorageUtil.pl # # Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. # # NAME # hoststorageUtil.pl - <one-line expansion of the name> # # DESCRIPTION # <short description of component this file declares/defines> # # NOTES # <other useful comments, qualifications, etc.> # # MODIFIED (MM/DD/YY) # rajverma 05/22/08 - Script to get the config parameters for hoststorage # rajverma 05/22/08 - Creation # use storage::Utilities; $ENV{PATH} = "/bin:/usr/bin:/usr/sbin:/usr/local/bin:/sbin:$ENV{EMDROOT}/bin"; my $os_name = `uname -s`; chomp($os_name); #Check if Os is supported or not @os_list = storage::Utilities::getConfig("OS"); my $hs_support = 0; foreach my $opsys (@os_list) { if (uc($opsys) eq uc($os_name)) { $hs_support = 1 ; } } my $nmhs_perm = 1; #Throw the error on 3rd day of the week. # my $week_day = `date +%u` ; #Default is wednesday ie. 3 # my @err_day = ("3") ; # @err_day = storage::Utilities::getConfig("Day") # if storage::Utilities::getConfig("Day") ; # Check for the suid bit in the"nmhs" . If not set throw error and exit. # my $nmhs_err = "error::snmhsutl.c:executable" ; # my $dev = "/dev/hda"; # my $nmhs_cmd = "nmhs execute_scsi_inquiry ". $dev; # my $nmhs_out = `$nmhs_cmd`; # Check for error. If error return with proper message. # if(($nmhs_out =~ m/^$nmhs_err/) && ($week_day == "@err_day")) # { # $nmhs_perm = 0; # } # Check which of the entities (Disk, FS, Vol) has crossed the monitoring limit. my @limit_list = storage::Utilities::getConfig("Limit"); print "em_result=Operating System|$hs_support\n"; foreach $line(@limit_list) { $line =~ s/_Limit=/|/; print "em_result=$line \n"; }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de