Sponsored Content
Full Discussion: Pegging counter
Top Forums UNIX for Dummies Questions & Answers Pegging counter Post 302826747 by vanand420 on Thursday 27th of June 2013 08:22:50 AM
Old 06-27-2013
Pegging counter

Hi Experts,

I am in need for some help. My competence level on unix is not at all helping me to resolve this. Please help.

My Input for a system command is as under:

Counters are getting pegged each hour. I need to have a difference printed rather than pegged counter values.

Code:
Counter Name     06/27 17:00     06/27 16:00     06/27 15:00
============================================================
Apple:              21056370        20966781        20880827
Mango:              13698085        13639570        13583601
Cherry:                34591           34468           34365
Banana:                46900           46707           46555

I am looking to get the difference of all the counter name for the hours.

Expected output:

Code:
Counter Name                 06/27 17:00     06/27 16:00         
=========================================
Apple                     :       89589	85954             
Mango                    :       58515	55969              
Cherry                    :       123	103        
Banana                   :       193	152

i.e line has arrived as
Code:
Apple                     :       89589(21056370-20966781)	85954(20966781-20880827)

Thanks in advance..

Last edited by zaxxon; 06-27-2013 at 09:30 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

counter

Hi, I need some help. Shell script counter. i need to add condition to check if counter is more than 10 and longer than 3 hours? it runs every 5 mins. it only check count and send email right now. it runs in cron as below gregcount.ksh gregdb 10 > /tmp/gregcount.out 2> /tmp/gregcount.err ... (1 Reply)
Discussion started by: pega
1 Replies

2. Shell Programming and Scripting

grep and counter

Hi, I have such an example(ksh): name1=Example directory=/directory1/Example/directory2 match=$(grep -s '$name1' $directory | wc -l) echo $match But it replies to me: 0 What I expect from it, is to find $name1 in $directory and produce 1 for me as true, not false. (3 Replies)
Discussion started by: chish
3 Replies

3. UNIX for Dummies Questions & Answers

histogram or counter

Dear all, I have numerous dat files (a.dat, b.dat...) containing 500 numeric values each. I would like to count them, based on their range and obtain a histogram or a counter. INPUT: a.dat 1.3 2.16 0.34 ...... b.dat 1.54 0.94 3.13 ..... ... (2 Replies)
Discussion started by: chen.xiao.po
2 Replies

4. Shell Programming and Scripting

List Counter

cat sport_by_month Month : Jan sport :Football sport :Volleyball Month: Feb sport :BasketBall sport: Cricket sport: Fotball Month: Mar Month: APR sport : Bowling sport : Climbing I need your help to have a script that count the number of sports per month and sorted by mont with... (7 Replies)
Discussion started by: Sara_84
7 Replies

5. Shell Programming and Scripting

problem with counter

i having a file xxxxxxxxxxxxxxx1234 ...........value can be change xxxxxxxxxxxxxxx1235 xxxxxxxxxxxxxxxx1236 . . . . xxxxxxxxxxxxxxxxx1300 ...........value can be change i want to cut last four characters of first line and last line and find the missing pattern. output should... (4 Replies)
Discussion started by: sagar_1986
4 Replies

6. Shell Programming and Scripting

Counter

if ;then echo "mrnet greater 5000" gzip /var/log/mrnet.log mv /var/log/mrnet.log.gz /var/log/mrnet.log.1.gz if ];then i=1 let i++ mv /var/log/mrnet.log.1.gz /var/log/vieux-logs/mrnet.log.$i.gz else echo "theres no... (1 Reply)
Discussion started by: Froob
1 Replies

7. Shell Programming and Scripting

Help require with counter

I have this file 1801,A1,2012-12-16 15:59:59.995,id2_3,ab,phoneC2-00,VOE,,,,,,,,,,,,,,, 1802,A1,2012-12-16 15:59:59.995,id2_3,ab=,phoneX1-01,BL,,,,,,,,,,,,,,, 1803,A1,2012-12-16 15:59:59.995,id2_3,ab,phone300,BL,,,,,,,,,,,,,,, 1804,A1,2012-12-16... (4 Replies)
Discussion started by: nikhil jain
4 Replies

8. Shell Programming and Scripting

Record counter

For the following code SEQ=200 awk -v S="$SEQ" ' $0 ~ S { N++ print N } ' "$1"ascii >"$1"search N is printed 8002 times as it occurred 8002 times in file how I could print the counter one time only (20 Replies)
Discussion started by: khaled79
20 Replies

9. Shell Programming and Scripting

Do i miss counter or what

hello this script should show all users and space they used without problem : ls /home >> /root/users.txt cat /root/users.txt | while read line; do space=`du -s /home/$line` echo "$line space is $space" shift done but when i remove pipe ,script run without any output: ls /home... (4 Replies)
Discussion started by: nimafire
4 Replies
ipsec_config(1M)														  ipsec_config(1M)

NAME
ipsec_config - add, delete, export, and show HP-UX IPSec configuration objects in the HP-UX IPSec configuration database SYNOPSIS
[operation [object_type]] DESCRIPTION
The command adds, deletes, exports, and shows HP-UX IPSec configuration objects in the HP-UX IPSec configuration database, If HP-UX IPSec is active and running, also updates the HP-UX runtime IPSec policy database and runtime IKE information (IKE policies and authentication records). You must be superuser to run The utility can operate in command-line mode or batch mode. In command-line mode, reads all input from the command line. In batch mode, reads add and delete operations from a file. Batch mode allows administrators to add and delete multiple configuration objects in one operation. HP-UX IPSec processes the operations in a batch file as a group. Batch mode is useful if you are adding or deleting configura- tion records that may affect other records. HP recommends that you use a batch file to add configuration information. A batch file provides a permanent record of the configuration data and can be used to re-create the configuration database. Separate command arguments using whitespace (blanks, tabs or newlines). Use a backslash line continuation character to continue command input on subsequent lines. Operations and Object Types The command supports the following operations: See ipsec_config_add(1M) for more information. See ipsec_config_batch(1M) for more information. See ipsec_config_delete(1M) for more information. See ipsec_config_export(1M) for more information. See ipsec_config_show(1M) for more information. object_type can be one of the following: Authentication records, which specify Internet Key Exchange (IKE) versions, authentication methods, identity information and preshared keys. Bypass addresses. security certificate for a Certificate Authority (used for IKE authentication with RSA signatures). Certificate Revocation List (CRL). A CRL contains a list of revoked X.509 security certificates. If you have a CRL, HP-UX IPSec check it during the IKE authentication process to verify that the remote system's security certificate is valid (not revoked). Certificate Signing Request (CSR), which the HP-UX IPSec administrator can submit to a Certificate Authority (CA) to request a signed X.509 security certificate. Host IPsec policies, which specify HP-UX IPSec behavior for processing IP packets when the local system is an end host. IKE version 1 (IKEv1) policies. IKE version 2 (IKEv2) policies. security certificate for the local system (used for IKE authentication with RSA signatures). Start-up options. Tunnel IPsec policies, which specify IPsec tunnel transform parameters. Configuring Objects In most HP-UX IPSec topologies, you must configure the following objects: o Host IPsec policies o Authentication records (IKE ID information and preshared keys) To establish IPsec security, you must also have an IKE version 1 (IKEv1) or IKE version 2 (IKEv2) policy. The HP-UX IPSec product installs a default IKEv1 policy and a default IKEv2 policy. You can use these default policies without modifications in many topologies. HP recommends that you use the following procedure to configure HP-UX IPSec: 1. Create a batch file to configure IPsec policies and authentication records. An IKEv1 or IKEv2 policy is also required, but in most cases you can use the default IKEv1 or IKEv2 installed with the product. If you want to configure host-to-host IPsec poli- cies and use IKE with preshared keys for IKE authentication, create a batch file to contain the following statements: See the command subsection in ipsec_config_add(1M) for syntax and usage information. If you are using HP-UX IPSec with certificates (RSA signatures) for IKE authentication, you must also use the following com- mands to configure certificates: You must enter the above commands at the command-line prompt. (You cannot specify them in an batch file). The command creates a certificate signing request (CSR). As an alternative, you can use a utility provided by the certificate vendor to create the CSR. 2. Test the syntax of your batch file by entering the following command: The option verifies the syntax without adding objects to the database. 3. If the syntax is correct, add the configuration information to the configuration database by entering the following command: 4. Start and verify HP-UX IPSec. Use the following command to start HP-UX IPSec: Generate network traffic that uses IPsec. Use the following command to verify operation: Verify that HP-UX IPSec has created Security Associations (SAs) with the appropriate systems. 5. Use the command to configure HP-UX IPSec to automatically start at system boot-up time. ipsec_config Help The displays help and usage information for the HP-UX IPSec operations. Use the following syntax to access help: [operation [option_type]] EXAMPLES
You have two systems, Apple and Banana Apple and Banana are not multihomed. You want to secure all telnet packets between the two systems using IPsec ESP with AES, authenticated with SHA-1. The IKE version is IKEv1. This is a private network, and you will allow all other packets to pass in clear text. You use the default IKEv1 policy. On Apple, you configure: o Two host IPsec policies o One authentication record The first host IPsec policy, telnetAB, secures outbound telnet connections (Apple is the telnet client). You do not need to specify the source argument, since it will default to any IP address and any port, and the telnet client port number is dynamically allocated. The second policy, telnetBA, secures inbound telnet connections (Apple is the telnet server). The authentication record specifies the preshared key value used with (Banana): The configuration on Banana is the mirror image of the configuration on Apple: AUTHOR
was developed by HP. FILES
configuration database. default profile file. SEE ALSO
ipsec_admin(1M), ipsec_config_add(1M), ipsec_config_batch(1M), ipsec_config_delete(1M), ipsec_config_export(1M), ipsec_config_show(1M), ipsec_migrate(1M), ipsec_policy(1M), ipsec_report(1M). HP-UX IPSec Software Required ipsec_config(1M)
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy