Sponsored Content
Top Forums Shell Programming and Scripting display time required to complete running script Post 302277815 by npatwardhan on Sunday 18th of January 2009 08:20:30 AM
Old 01-18-2009
display time required to complete running script

hi is there any way i can display a countdown time needed to run a script? like load a counter at the beginning of the script with the estimated time and display the counter decrementing till it finishes running the script?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script to display last login date/time?

I was wondering if anyone had a script that would display the last time a user logged into a particular machine. I know about the "last" command, but it gives too much info.... I just wanted to know the last time a user used his/her id. ANy help would be greatly appreciated. Ryan (3 Replies)
Discussion started by: ryaneverett5
3 Replies

2. Shell Programming and Scripting

shell script takes long time to complete

Hi all, I wrote this shell script to validate filed numbers for input file. But it take forever to complete validation on a file. The average speed is like 9mins/MB. Can anyone tell me how to improve the performance of a shell script? Thanks (12 Replies)
Discussion started by: ozzman
12 Replies

3. Shell Programming and Scripting

Script to display time difference..

Hi i've written a script which reads last two line of the log file from N number of servers and send the mail by redirecting to a particular log file. And the two lines is displayed below. Oracle Q03 Begin Hot BACKUP Time: 07/23/08 18:35:46 Oracle Q03 End Hot BACKUP Time: 07/24/08 14:18:15... (1 Reply)
Discussion started by: suri.tyson
1 Replies

4. Shell Programming and Scripting

script to display time

hey folks, i am stuc in this problem. You all might help me out. I want to write a BASH script to display time every 15 seconds using %r field descriptor. And want to clear the window each time before displaying time using clear command. Please help me out (3 Replies)
Discussion started by: manojrsb
3 Replies

5. Shell Programming and Scripting

<AIX>Problem in purge script, taking very very long time to complete 18.30hrs

Hi, I have here a script which is used to purge older files/directories based on defined purge period. The script consists of 45 find commands, where each command will need to traverse through more than a million directories. Therefore a single find command executes around 22-25 mins... (7 Replies)
Discussion started by: sravicha
7 Replies

6. UNIX for Advanced & Expert Users

Need to display complete format of ps

Hi All, For one of my script I need to get the complete format of PS as result. Actually in our application, we have to execute some program to get the data for batch files. Now there is some java script is running on unix for this which is not identifiable. I want to know how to... (2 Replies)
Discussion started by: nishank.jain
2 Replies

7. UNIX Desktop Questions & Answers

Shell script to display user logged in within given time

how can i know which users have logged in at specified given start and end time in 24 hour format? (3 Replies)
Discussion started by: meherzad4u
3 Replies

8. UNIX for Dummies Questions & Answers

Display problem when running a remote script

Hi, Quick question, someone will hopefully be able to stop me from :wall:. I currently have a script which calls a script on a remote machine and captures the stdout to a file: ssh <user>@<server> > output 2>/dev/null <<_EOF /path/script.ksh _EOF This runs the script but the... (4 Replies)
Discussion started by: chris01010
4 Replies

9. Shell Programming and Scripting

How to display information of the script while its running?

how to display the messages on screen IN PERL such as " 1. Entering while loop" if the script enters a while loop. 2. Checking FILENAME. etc... 3. Print statement is also not helpful.... (1 Reply)
Discussion started by: Rashid Khan
1 Replies

10. Shell Programming and Scripting

Display current directory for a running process for script

I'm trying to create a ksh script to do the following: 1) Ask the user what process they want to search for. 2) Have the script read the input as a variable and use it to search for the process. 3) Display the current time & date, the working directory of the process, and finally display the... (6 Replies)
Discussion started by: seekryts15
6 Replies
counter(n)						      Counters and Histograms							counter(n)

__________________________________________________________________________________________________________________________________________________

NAME
counter - Procedures for counters and histograms SYNOPSIS
package require Tcl 8 package require counter ?2.0.4? ::counter::init tag args ::counter::count tag ?delta? ?instance? ::counter::start tag instance ::counter::stop tag instance ::counter::get tag args ::counter::exists tag ::counter::names ::counter::histHtmlDisplay tag args ::counter::reset tag args _________________________________________________________________ DESCRIPTION
The counter package provides a counter facility and can compute statistics and histograms over the collected data. ::counter::init tag args This defines a counter with the name tag. The args determines the characteristics of the counter. The args are -group name Keep a grouped counter where the name of the histogram bucket is passed into ::counter::count. -hist bucketsize Accumulate the counter into histogram buckets of size bucketsize. For example, if the samples are millisecond time values and bucketsize is 10, then each histogram bucket represents time values of 0 to 10 msec, 10 to 20 msec, 20 to 30 msec, and so on. -hist2x bucketsize Accumulate the statistic into histogram buckets. The size of the first bucket is bucketsize, each other bucket holds values 2 times the size of the previous bucket. For example, if bucketsize is 10, then each histogram bucket represents time values of 0 to 10 msec, 10 to 20 msec, 20 to 40 msec, 40 to 80 msec, and so on. -hist10x bucketsize Accumulate the statistic into histogram buckets. The size of the first bucket is bucketsize, each other bucket holds values 10 times the size of the previous bucket. For example, if bucketsize is 10, then each histogram bucket represents time val- ues of 0 to 10 msec, 10 to 100 msec, 100 to 1000 msec, and so on. -lastn N Save the last N values of the counter to maintain a "running average" over the last N values. -timehist secsPerMinute Keep a time-based histogram. The counter is summed into a histogram bucket based on the current time. There are 60 per- minute buckets that have a size determined by secsPerMinute, which is normally 60, but for testing purposes can be less. Every "hour" (i.e., 60 "minutes") the contents of the per-minute buckets are summed into the next hourly bucket. Every 24 "hours" the contents of the per-hour buckets are summed into the next daily bucket. The counter package keeps all time-based histograms in sync, so the first secsPerMinute value seen by the package is used for all subsequent time-based histograms. ::counter::count tag ?delta? ?instance? Increment the counter identified by tag. The default increment is 1, although you can increment by any value, integer or real, by specifying delta. You must declare each counter with ::counter::init to define the characteristics of counter before you start to use it. If the counter type is -group, then the counter identified by instance is incremented. ::counter::start tag instance Record the starting time of an interval. The tag is the name of the counter defined as a -hist value-based histogram. The instance is used to distinguish this interval from any other intervals that might be overlapping this one. ::counter::stop tag instance Record the ending time of an interval. The delta time since the corresponding ::counter::start call for instance is recorded in the histogram identified by tag. ::counter::get tag args Return statistics about a counter identified by tag. The args determine what value to return: -total Return the total value of the counter. This is the default if args is not specified. -totalVar Return the name of the total variable. Useful for specifying with -textvariable in a Tk widget. -N Return the number of samples accumulated into the counter. -avg Return the average of samples accumulated into the counter. -avgn Return the average over the last N samples taken. The N value is set in the ::counter::init call. -hist bucket If bucket is specified, then the value in that bucket of the histogram is returned. Otherwise the complete histogram is returned in array get format sorted by bucket. -histVar Return the name of the histogram array variable. -histHour Return the complete hourly histogram in array get format sorted by bucket. -histHourVar Return the name of the hourly histogram array variable. -histDay Return the complete daily histogram in array get format sorted by bucket. -histDayVar Return the name of the daily histogram array variable. -resetDate Return the clock seconds value recorded when the counter was last reset. -all Return an array get of the array used to store the counter. This includes the total, the number of samples (N), and any type-specific information. This does not include the histogram array. ::counter::exists tag Returns 1 if the counter is defined. ::counter::names Returns a list of all counters defined. ::counter::histHtmlDisplay tag args Generate HTML to display a histogram for a counter. The args control the format of the display. They are: -title string Label to display above bar chart -unit unit Specify minutes, hours, or days for the time-base histograms. For value-based histograms, the unit is used in the title. -images url URL of /images directory. -gif filename Image for normal histogram bars. The filename is relative to the -images directory. -ongif filename Image for the active histogram bar. The filename is relative to the -images directory. -max N Maximum number of value-based buckets to display. -height N Pixel height of the highest bar. -width N Pixel width of each bar. -skip N Buckets to skip when labeling value-based histograms. -format string Format used to display labels of buckets. -text boolean If 1, a text version of the histogram is dumped, otherwise a graphical one is generated. ::counter::reset tag args Resets the counter with the name tag to an initial state. The args determine the new characteristics of the counter. They have the same meaning as described for ::counter::init. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category counter of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
counting, histogram, statistics, tallying counter 2.0.4 counter(n)
All times are GMT -4. The time now is 04:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy