Sponsored Content
Top Forums Programming Open Source Help with writing Shell Script to automate process using multiple commands Post 302974808 by stomp on Friday 3rd of June 2016 01:01:23 PM
Old 06-03-2016
Yes. I recommend too to use zabbix. You may get help from your colleagues, which have already probably good knowledge handling it. Using zabbix now helps you to work with it with your production servers too. And at least no one would like to have the complexity multiple different monitoring systems if there's no need for it.

Maybe it's a good option to set up a zabbix instance for your own. So you do not kill the production monitoring system if configuration errors occur. If you get all up and running at your test site, you may migrate your rules from test to production monitoring system.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to call multiple java commands

Hi, I want to call multiple java commands through a .sh file. I have drafted one with my least knowledge. But its not working. Pls help. I am trying to run this from Sun Solaris (OS 5.10) server with 10g oracle database. echo \* starting script AUTORUN echo \* get the Monitor path... (4 Replies)
Discussion started by: vivekdn
4 Replies

2. UNIX for Advanced & Expert Users

Automate Script using pkgrm/pkgadd commands

This is my first post so hello to all of you! I have a script in bash-3.00 that needs to execute the following: pkgrm (to remove an existing package) pkgadd -d ( to install a new package) The problem is that both commands prompt me to answer either y,n or q in order to proceed with... (13 Replies)
Discussion started by: Insight
13 Replies

3. Shell Programming and Scripting

writing shell scripts of commands

can anyone help me in writing a shell script to visualize how simple commands work and on what logic. For Eg: ls command how it lists out all the files and directories, need to write a simple script based on the commands source code.:D (0 Replies)
Discussion started by: rahul_11d
0 Replies

4. Shell Programming and Scripting

writing a shell script of commands

Can anyone help me out in visualizing on what is the logic behind simple unix commands. For Eg: ls command lists files and directories, how it displays I need to know the source code for commands like this. (1 Reply)
Discussion started by: rahul_11d
1 Replies

5. UNIX for Dummies Questions & Answers

Writing a loop to process multiple input files by a shell script

I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files: for i in 250.*; do || awk... (4 Replies)
Discussion started by: evelibertine
4 Replies

6. Shell Programming and Scripting

Need help in creating a shell script to automate svnstats process

Hi, I am trying to create a shell script to automate the following process of getting svn stats:- Step1:- cd to checkout location. Note that the checked code have multiple modules in respective folders Step2:- Execute this command inside each module:- svn log -v --xml >... (0 Replies)
Discussion started by: d8011
0 Replies

7. Shell Programming and Scripting

Automate multiple commands

Hi, I am trying to count the number of times a string of letters occurs in a file for multiple unique strings of letters. Right now I can do this one at a time using the following code (in this example I am searching for the string "AAA"): echo AAA >> outfile.txt grep -c "AAA" -r... (4 Replies)
Discussion started by: gecko1
4 Replies

8. UNIX for Dummies Questions & Answers

Automate sftp process using script

Hi, guys, I am trying to automate a sftp process using "expect" method (since the key authentication method is disabled in my company network, there is no helping it). In order to try, I type in the command manually: sftp @ > << EOF >cd >ls -l >EOF >Connecting to @servername password: ... (3 Replies)
Discussion started by: warmboy610
3 Replies

9. Shell Programming and Scripting

How to catch errors in a shell script ( multiple commands )?

Hi I have a shell script like that Main() { DAY=$(date +"%d-%m-%Y") TIME=$(date +"%T") Command 1 Command 2 ... Command n } I would like to catch errors from all commands in Main() and write these errors into a file , something likes this: Main if < error > then echo... (3 Replies)
Discussion started by: bobochacha29
3 Replies

10. Shell Programming and Scripting

Script to automate recovery process

Hello All! First post... I am working on a script that is used to recover a crashed drive from an rsync backup. I'm down to the place where I need to create all of the directories in /mnt where I will then mount each of the volumes and begin the restore process to each volume... I have... (3 Replies)
Discussion started by: RogerBaran
3 Replies
LAYINGSIEGE(7)						 Miscellaneous Information Manual					    LAYINGSIEGE(7)

NAME
Siege - An HTTP/HTTPS stress tester was designed orignally as a internet usage simulator. In short, its role was to simulate the activity of many simultaneous users hitting a HTTP server. We were debugging some java code and during that process we arrived at a point where the code could withstand an acceptable number of users hitting a single URL but it could not withstand the seemingly random activity that char- acterizes many users hitting many URLs on a webserver. In order to debug the problem in a lab environment, I developed a program that simply read a bunch of URLs ( we used images, scripts, static html, jsps, etc. ) into memory and hit them randomly. The result was a success. We were able to break the code in the lab, an occurance which ultimately allowed us to fix it and put it into production. As the developers code improved, siege improved until we ulti- mately had good java code and a pretty decent regression tool. It was helpful for us, I hope it is helpful to you. In order to feel comfortable putting code into production, you need a way to measure its performance and to determine its threshold for failure. If you break your database pool at 250 simultaneous users and you average less then one-hundred simultaneous users and the code performs favorably, you can feel good about putting it into production. At the same time, if you should monitor trends in your site's activity and prepare for the moment when your traffic starts to near your threshold for failure. As a webdeveloper or websystems administrator you have little to no control over your user group. They can visit your site anytime day or night. Your domain name could resemble a popular site, yoohoo.com? And when was the last time marketing informed you about an approaching advertising blitz? You must be prepared for anything. That is why stress and performance testing is so important. I would not recommend putting anything into production until you have a good feel for how it will perform under duress. LAYING SIEGE
Whenever we add new code to a webserver, we place the server "under siege." First we stressthe new URL(s) and then we pound the server with regression testing with the new URLs added to the configuration file. We want to see if the new code will stand on its own, plus we want to see if it will break anything else. The following statistics were gleaned when I laid siege to a single URL on a http server: Transactions: 1000 hits Elapsed time: 617.99 secs Data transferred: 4848000 bytes Response time: 59.41 secs Transaction rate: 1.62 trans/sec Throughput: 7844.79 bytes/sec Concurrency: 96.14 Status code 200: 1000 In the above example, we simulated 100 users hitting the same URL 10 times, a total of 1000 transactions. The elapsed time is measured from the first transaction to the last, in this case it took 617.99 seconds to hit the http server 1000 times. During that run, siege received a total of 4848000 bytes including headers. The response time is measured by the duration of each transaction divided by the number of transactions. The transaction rate is number of transactions divided by elapsed time. Throughput is the measure of bytes received divided by elapsed time. And the concurrency is the time of each transaction divided by the elapsed time. The final statistic is Status code 200. This is the number of pages that were effectively delivered without server errors. To create this example, I ran siege on my Sun workstation and I pounded a GNU/Linux Intel box, essentially a workstation. The performance leaves a lot to be desired. One indication that the server is struggling is the high concurrency. The longer the transaction, the higher the concurrency. This server is taking a while to complete the transaction and it continues to open new sockets to handle all the addi- tional requests. In truth the Linux box is suffering from a lack of RAM, it has about 200MB, hardly enough to be handling one hundred con- current users. :-) Now that we've stressed the URL(s) singly, we can add them to our main configuration file and stress them with the rest of the site. The default URLs file is /etc/siege/urls.txt. Siege can allow websystems administrators a chance to see how their servers perform under duress. I recommend running server performance monitoring tools while it is under siege to gage your hardware / software configurations. The results can be surprising... Siege was originally based on Lincoln Stein's torture.pl and if you cannot it on your architecture, it is recommended that you run that excellent perl script instead. I intentionally modeled my statistics output after his in order to maintain similar reference. COPYRIGHT
Copyright (C) 2000 2001 2004 Jeffrey Fulmer, et al. <jeff@joedog.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Fo undation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AVAILABILITY
The most recent released version of siege is available by anonymous FTP from sid.joedog.org in the directory pub/siege. SEE ALSO
siege(1) siege.config(1) urls_txt(5) Siege v2.70 April-17-2012 LAYINGSIEGE(7)
All times are GMT -4. The time now is 08:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy