Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Report generation using script Post 303042010 by fretagi on Wednesday 11th of December 2019 03:13:18 AM
Old 12-11-2019
Report generation using script

Hi all

I have a unix script that generates a report with the following information:
uptime, mounted file systems, disk usage (> 90% --> critical, <75%-90%> --> warning, < 75% healthy), Mem usage, CPU usage and load average.

But I would like to create one single report containing all this information but for 10 servers.
Please can you give an hint in how do I go about it
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Oracle Report generation

Hi, I am beginner in shell programming.In a shell script i found a call to a script 'runrep25m',which i think is to generate oracle reports?Could anyone help me by providing some details about its usage With Thanks & Regards Dileep (7 Replies)
Discussion started by: DILEEP410
7 Replies

2. Shell Programming and Scripting

awk- report generation from input file

I have input file with below content: Person: Name: Firstname1 lastname1 Address: 111, Straat City : Hilversum Person: Name : Fistname2 lastname2 Address: 222, street Cit: Bussum Person: Name : Firstname2 lastname3 Address: 333, station straat City: Amsterdam I need... (6 Replies)
Discussion started by: McLan
6 Replies

3. UNIX for Dummies Questions & Answers

report generation

Hello, I got a requirement in writing a sheel script in unix, please help me out the requirement is there are two folders Folder1 and Folder2 and there are same files in the different folders. like file1,file2 in folder1 and file1 and file2 in folder2. I would like to compare all the... (2 Replies)
Discussion started by: gmahesh2k
2 Replies

4. Shell Programming and Scripting

Report generation

Hello, I got a requirement in writing a KSH script in unix, please help me out the requirement is there are two folders Folder1 and Folder2 and there are same files in the different folders. like file1,file2 in folder1 and file1 and file2 in folder2. I would like to compare all the similar... (3 Replies)
Discussion started by: gmahesh2k
3 Replies

5. Shell Programming and Scripting

Report Generation with Grep

All, I am pretty new to Unix Environment. I am not sure if my requirement can be accomplished in Unix. I did try searching this forum and others but could not get an answer. Requirement is explained below: I have a set of files in a folder. file1_unload file2_unload file3_unload... (7 Replies)
Discussion started by: bharath.gct
7 Replies

6. Shell Programming and Scripting

Disk report generation problem

Hello everyone, I have a list of inputs as below. My logic is to get the particular powerdisk which matches for ASM disk which means take the major & minor number of each asm disk and matches with powerdisk info then get the particular powerdisk $ ls -l /dev/asm_* ---> ASM disk info... (11 Replies)
Discussion started by: kannan84
11 Replies

7. Shell Programming and Scripting

File Report Generation

hi all i need to generate a report file that contains the following details of files present in a directory. 1. File name 2.Complete path for each files and directory 3.File size 4.Days older example i have a directory testing that contains sub-directories and some files. i need to make a... (5 Replies)
Discussion started by: yashwantkumar
5 Replies

8. Shell Programming and Scripting

Report generation based on certain conditions

Hi I recently joined a project where I have been asked to generate a report using shell script accessing UNIX box. I have no idea on how to do it as I am a beginner and learning shell scripts. Suppose I have a XML: Code: ... (3 Replies)
Discussion started by: vat1kor
3 Replies

9. Shell Programming and Scripting

Report generation using perl script

Hi, I have a perl script to read the log file and create a report from it. I have the script file and log file in a different directories. Now i have pipe the log file data to the perl script to create the report (HMTL file). I am using the below command this isn't working tail -f... (4 Replies)
Discussion started by: vel4ever
4 Replies

10. UNIX for Beginners Questions & Answers

UNIX cluster disk usage report generation for yesterday & today and email

HI Team, I am trying to create a shell script to generate a yesterday and today report to compare and email in daily basis. can you please help me on the same. #!/bin/bash #Author: ******************* #Description: This script will return the following set of system information: ... (2 Replies)
Discussion started by: Mi4304
2 Replies
DUREP(1)						    Disk Usage Report Generator 						  DUREP(1)

NAME
durep - disk usage report generator SYNOPSIS
durep [OPTIONS]... [DIRECTORY] DESCRIPTION
durep creates disk usage reports with bar graphs, allowing one to easily deduce which directories are using the most space. Although durep can produce text output similar to du, its real power lies in the ability to store reports in a file, which can then be viewed as a web page with the supplied cgi script. OPTIONS
Options are grouped into three distinct sections. Text Output Options These options are for controlling the text report output. -td, --text-depth=N Limit text report on directories to depth N. No directories below this level will be shown in the report. -hs, --hide-size=N[bkmg] Do not display entries using N Bytes/KB/MB/GB or less (default Bytes). This is to reduce clutter in the reports. It allows you to remove small files from the text report. -sd, --show-date Display the modification date of the file or directory in the report. -ns, --nosort Do not sort results by size. Leaves results in the order in which they were scanned, which is highly dependent on the file system. -q, --quiet Do not produce text output. This stops the creation of a text report, and is useful when you are only interested in generating a save-file for use with the web report. File Options These options control load and save files. -sf, --save-file=FILE Save the results of the scan into this file. This can be loaded for a text report, but is generally used by the cgi script to display web reports. The filename should end in .ds (it is appended if it does not). -lf, --load-file=FILE Load the results of a scan from this file. This takes the place of scanning a directory. Inclusion options (described below) will not take effect if this option is used. -d, --desc=DESCRIPTION Give a description to be stored in the save-file. This is displayed on the web report summary page. -c, --collate==DIR Collate the save-files in the given directory. This creates a durep.cds file, which is used by the cgi script to manage and display save-files. See Web Reports section below for more detail. Inclusion Options These options control which directories and files should be included in the report. -f, --files Do not descend into sub-directories, only report files. -x, --one-file-system Do not traverse file systems. This is similar to the -x option for du, allowing easy checking of an entire file system such as /. -cp, --collapse-path=PATTERN Hide entries below paths that match PATTERN. This allows you to conceal the contents of certain directories in the report. You may wish perhaps to show home directories in a report but not show their content in which case you could use the option "-cp '/home'". -ep, --exclude-path=PATTERN Ignore paths that match PATTERN. This works in a similar manner to "-cp" above, except it excludes the directory from the scan itself. -cf, --coalesce-files==N[bkmg] Coalesces entries for files below the given size into one entry. This is useful for reducing clutter in reports. WEB REPORTS
Since version 0.9, durep no longer directly generates html files for its web reports. It now uses a cgi script that reads data from save- files. The script will handle multiple save-files, potentially from multiple hosts, so you can consolidate your reports into one place. Copying save-files from other hosts is left as an exercise for the reader. It is necessary to collate the save-files before viewing them via the cgi script. This process creates the file "durep.cds" which contains meta-data about all of the save-files. From this a summary page is shown where you can choose which report you wish to view. The collation must be done any time a save-file is added or overwritten. The cgi-script has some configurable variables at the top. These tell the script where to look for the css file and the graphic used for the bar graphs. There are also options to set whether the modification date, and/or the options used to create the save-file should be shown. These are both set to 1 by default. As always, you should take care when installing the cgi script. I've done my best, but I make no guarantees about its security. It would probably be unwise to allow this script to be accessed from the Internet at large. EXAMPLES
1. durep -td 2 This would print the directory tree starting from the current directory to depth 2. 2. durep -f /var/spool/mail This might be useful for keeping a check on the mail directory. The "-f" switch tells durep to just scan files and not descend into directories. 3. durep -x -cp "/(etc|usr/share)" -ep "/var" -sf /var/lib/durep/root.ds / This more complicated version does the following. It scans the root file system only, collapses the contents of any paths beginning /etc or /usr/share and skips the contents of the /var directory. It saves the output of this report into the file /var/lib/durep/root.ds. No text report is produced. 4. durep -lf /var/lib/durep/root.ds -hs 1m This reads the save-file /var/lib/durep/root.ds and produces a text report from it, hiding any files below 1 megabyte. 5. durep -c /var/lib/durep This collates any save-files in /var/lib/durep. SEE ALSO
du(1), perl(1) AUTHOR
Damian Kramer <psiren@hibernaculum.net> durep version 0.9 2012-05-12 DUREP(1)
All times are GMT -4. The time now is 03:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy