Sponsored Content
Full Discussion: script to update the stats
Top Forums Shell Programming and Scripting script to update the stats Post 302367503 by Scrutinizer on Monday 2nd of November 2009 10:30:48 PM
Old 11-02-2009
Almost. Assuming that /home/elogic1 contains only the names of the domains, you need to cut off the path of the $domain variable:
Code:
#!/bin/bash

username=elogic1
domains="/home/elogic1/*"
path_to_webalizer=/hsphere/shared/bin/webalizer

for domain in $domains
do
  path_to_logs=/hsphere/local/home/elogic1/logs/${domain##*/}
  output_dir_statistics=$path_to_logs/webalizer
  log_file=$(ls $path_to_logs/$domain*|grep -v .gz)
  $path_to_webalizer -n $domain -o $output_dir_statistics $log_file
done

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script: want to insert values in database when update script runs

Hi , I am new to linux and also also to shell scripting. I have one shell script which unpacks .tgz file and install software on machine. When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies

2. Shell Programming and Scripting

script to gather weblogic jvm heap size stats

Hello, has anyone written something that will monitor/gather weblogic heap info ? I need to gather size, high/low stats to a file that I can upload to a speadsheet thanks for your help! (2 Replies)
Discussion started by: galenw
2 Replies

3. AIX

system stats

I recieved this out put below soemhow. Unfortunatly I did not write down the command I used to get it. Can someone tell me what command I use to gather these stats? OS = AIX 5.3 64Bit System Model: IBM,7026-6H1 Machine Serial Number:... (2 Replies)
Discussion started by: rocker40
2 Replies

4. AIX

IO Stats

Aix 5.3 I am trying to view the IO stats. I do the sar 5 5 but that is the WIO and si different than the IO stats right? I am just blanking on this. I know there is a command that I used to run that brings up a whole bunch of live stats that run live such as mem and so on just can't rememeber... (4 Replies)
Discussion started by: rocker40
4 Replies

5. Shell Programming and Scripting

script for taking the stats from a file

i have file which contains data like this every day.i need to pull up a report for counting the 203's in that file for each subscriber id.there are around 200 subscriber id's. all ths Y's which i have written in the script are the subscriber id's.could some one give me an idea as to how do it in... (22 Replies)
Discussion started by: archana234
22 Replies

6. Shell Programming and Scripting

Newbie to perl - Help with stats script

Hi, this is my first post so here goes..... I need help... I am trying to write a script to produce some stats based on a number of searches in a log file. Now i know how to do this using multiple variables which are really just greps, but I want a more efficent way of doing this as my poor... (1 Reply)
Discussion started by: ARwebble
1 Replies

7. Shell Programming and Scripting

Script to load daily average I/O stats from a .ksh file into Oracle db

Hi can anyone help me with a script to load output of the .ksh file into an Oracle database. I have attached sample output of the information that i need to load to the database (2 Replies)
Discussion started by: LucyYani
2 Replies

8. Shell Programming and Scripting

Execute Oracle gather stats via shell script

Hi , I am trying to automate a gather stats in shell script #!/usr/bin/ksh export ORACLE_HOME=/orcl/app/oracle/product/11.2.0.1/db_1 export PATH="$PATH:$ORACLE_HOME/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ORACLE_HOME/lib32" export TNS_ADMIN=/opt/netprobe/config... (1 Reply)
Discussion started by: neil.k
1 Replies
asadmin-stop-domain(1AS)					   User Commands					  asadmin-stop-domain(1AS)

NAME
asadmin-stop-domain, stop-domain - stops the given domain SYNOPSIS
stop-domain [--domaindir install_dir/domains][--terse=false] [--echo=false] [domain_name] stop-domain stops the specified domain. If there is only one domain in the default domain directory (install_dir/domains), then no operand is required to stop the domain. However, if there is more than one domain, the domain operand must be specified. This command is supported in local mode only. OPTIONS
--domaindir directory where the domain is to be stopped. If specified, path must be accessible in the filesystem. If not speci- fied, the domainis stopped in the default install_dir/domains directory. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. OPERANDS
domain_name name of the domain. Must be a unique name. Example 1: Using stop-domain asadmin> stop-domain sampleDomain Stoping Domain sampleDomain, please wait Domain sampleDomain stopped Command stop-domain executed successfully Where: the sampleDomain domain in the default domains directory is stopped. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-domain(1AS), asadmin-delete-domain(1AS), asadmin-start-domain(1AS), asadmin-list-domains(1AS) J2EE 1.4 SDK March 2004 asadmin-stop-domain(1AS)
All times are GMT -4. The time now is 01:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy