General :: Bash Script To Monitor URL?

Mar 5, 2011

In my company we are hosting web applications from our server Using Apache and Apache Tomcat. Is it possible to write "Bash script to Monitor The entire URL's " I have basic ideas in bash script..

View 14 Replies


ADVERTISEMENT

General :: Bash Variable Naming The Server - Monitor Trunk Failure?

May 30, 2010

I'm writing a script for asterisk to monitor trunk failure, i do a loop for every trunk it got nad would like to name variable like server1=, server2= naming the server upgoing as the trunk is. here is the scripts:

[Code]....

what i would like to do is name the variable server, username and status with the count variable, like this server$COUNT to have server1 when on trunk one, bu as soon as i add the $COUNT after the server, it seems to try to make it a command, it says that:

Code:
./test.sh: line 45: server1=74.63.41.218: command not found

View 7 Replies View Related

Programming :: Bash To Monitor IP Addresses In A Txt File?

Oct 13, 2010

This code uses ping to check connectivity to a remote location and logs it to a .html file which is then stylized by css..

Code:

#! /bin/bash
path="$HOME/Desktop/IP_Monitor" #Path to write out files
ALT="0" #For styling alternative row

[code]....

I need to add a feature such that instead of hardcoding the ip address .. it takes them from a list and makes new files for each ip address for logging.. And also when log files are completed , They should be compressed using tar. How should i go about adding both these.. This is my first bash script.

View 6 Replies View Related

Ubuntu :: Firefox, Bash, And System Monitor Freeze Simultaneously?

Feb 10, 2010

I have been having a freaky experience where Firefox appears to freeze up and brings down the terminal and any process viewer with it. For example, I can open a gnome-terminal or xterm window, but the moment I press a key, that window freezes up as well and must be force-quitted with the Force Quit panel applet. In addition, the System Monitor applet I have on my top panel freezes. It's really weird.

I began having this problem around a month or two ago. I thought it was something to do with something I installed, so a week or so ago I did a clean install, backing up my documents, Firefox profile, and GNOME settings from the old installation but wiping everything else (I'd already ruled out the Firefox profile by renaming the folder and creating a new one from the profile manager). Yet the problem persists.

I'd be happy to post any output, but as bash (including Ctrl+Alt+F1 command line) freezes as well, it's a little hard to treat the problem when it happens. One more thing: I am on a university campus which uses 802.1x encryption on both wired and wireless connections; is it possible that that is causing the crashes?

View 1 Replies View Related

Programming :: Write A Bash Script That Continue Monitor The Tmp Directory?

Dec 25, 2010

In my tmp directory some logs are creating continue (with name logs.txt1, logs.txt2 up to 245). Some times these logs are creating continue within 1 or 3 second gap, now I want to write a bash script that continue monitor the tmp directory and if any time logs create simultaneously within 1 or 3 section gap it will alert me..( generally logs are create with the gap of 5 or 10 minutes duration or some time after one hours )

View 1 Replies View Related

Red Hat / Fedora :: Bash Script To Monitor Server Load / Mail From Command Line

May 4, 2010

I am attempting to write a very basic script that monitors a server's load and automatically emails an administrator upon the load reaching a certain threshold...

1.) `uptime | awk -F ' ' {'print $10'} | cut -d ',' -f1 | awk -F '.' {'print $1'}` -- the output from this command results in a decimal figure, so when that value is parsed and placed in an if statement, the value is not seen as a number. load-monitor.sh: line 9: [: 4.96: integer expression expected/How can I allow a number like "4.56" to be seen as an actual number within the if statement and be compared to 4, for instance?

2.) I am running a cPanel server on CentOS 5.4 -- when I run mail -s "SUBJECT" $EMAILADDRESS the command just hangs, and stracing the process shows it stuck on a read syscall.

3.) If I wanted to write this script in PHP, I have one primary confusion -- how can I mimic the functionality of obtaining the output from uptime via awk, etc. so that I can determine what the server load is at a given time? Which PHP function(s) would assist in that regard?

View 5 Replies View Related

General :: Screen Rate - Refresh Mode Of The Monitor In The Monitor Options Have Only One Option 60Hz

Mar 20, 2010

I am having problems with the refresh rate if the screen. In the refresh mode of the monitor in the monitor options have only one option 60Hz. I have LG 24 + ATI Radon 3870, and have already installed the ATI driver via Ubuntu download center.

View 1 Replies View Related

General :: Detect Monitor (Ubuntu 9.10, It Is Showing Unknown Monitor )?

Apr 20, 2010

I am now using Ubuntu 9.10. The prob is I am not able to increase the resolution of display. It is showing only 800 x 600 display. While trying to increase the resolution it is showing "Unknown Monitor". So, how can I detect the monitor so I can increase the resolution of my system.

View 3 Replies View Related

General :: Write A Literal Bash Command In A Bash File?

Nov 29, 2010

I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END

[code]...

View 6 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

General :: SSH Connection From BASH Script Stops Further BASH Script Commands

Dec 3, 2010

What happens when the script executes is that the ssh connection works and parks me at the remote hosts's shell login. Therefore, the "firefox" command refuses to execute. I need to know how to make the "ssh" connection occur, stay open, and go into the background so that the rest of the script can execute.If I could also do this with the "firefox" line so that the entire term window could be closed would also be helpful.

View 3 Replies View Related

Software :: Mouse Click On Monitor 1 Kills Full-screen In Flash On Monitor 2 ?

Feb 23, 2010

I'm playing with dual monitors. I have an NVIDIA GT220 set up so that my monitor and my TV are running as extended desktops. Everything is working well enough, but there is one annoying bit I've noticed:

If I'm watching ..... on monitor 1 in fullscreen and working on monitor 2, clicking anything in monitor 2 kills full-screen in monitor 1. Is this something that can be fixed somehow or is it a hardwired "feature"?

View 12 Replies View Related

Fedora :: 11 With Monitor - System - Preferences - Display Shows Unknown Monitor

Oct 16, 2009

I am facing problem with the fresh installation of Fedora 11. (I have moved from Fedora 9). When I try to view videos on ..... or use the Cheese Webcam Booth, I get blurred lines on the screen and I am unable to see any video or pic.

Also I noticed that the when i go to System > Preferences>Display, it shows me UNKOWN MONIOR.

However, if I got to System>Administration>Display and enter the su password, it shows me correct monitor and the graphics driver.

I am not sure if my original is related to the Unknown Monitor.

I also tried to install Nvidia driver but it crashed the xserver and I had remove the driver.

My Monitor is LG 700E and Graphics card is from intel. as I am not able watch any video.

View 5 Replies View Related

Fedora :: External Monitor Won't Work - Both Monitor And Laptop Screen Black

Aug 7, 2011

I am having problems getting my external monitor to work. When I plug in the monitor, both the laptop screen and the external monitor go black. When I unplug the monitor, the laptop screen works again.
When I startup with the external monitor plugged in, neither screen works or teh computer hangs or something.

I have had the external monitor going on a couple of occasions. I did manage to configure my monitors through System Settings > Display. I turned off the laptop monitor as I just want to use the external. But after rebooting, things didn't work.

I have a Thinkpad E420, Fedora 15

View 14 Replies View Related

Fedora :: Set Totem Player To Open In External Monitor And Not In Built-in Monitor

Aug 11, 2011

I have an external monitor connected to my laptop (extended display). I always drag the Totem player from the laptop screen to external monitor to watch video files. I wonder, if the Totem player can be set to open in the external monitor automatically, everytime I open it?

View 1 Replies View Related

Fedora Hardware :: External Monitor Not Detected - Dell Laptop - Monitor

Aug 17, 2011

My software and hardware information are as follows. I have Fedora 12 and KDE 4.4.5 installed on a Dell Vostro 1500 laptop. I believe it's a 64 bit processor; it's an Intel Core 2 Duo CPU. The external monitor is a Dell as well.

My problem is that my system does not seem to be detecting an external monitor that I have connected. Everything else is working just fine; however, I would like to have the option of attaching an external monitor. When I plug the external monitor into the laptop, the external monitor remains black and appears to be in power save mode. The results of xrandr -q (with or without the external monitor attached: it doesn't appear to change) are as follows.

Code:

How can I get my laptop to recognize that the external monitor is even connected? Let me know if I can be more specific or provide additional details.

View 5 Replies View Related

Hardware :: Dual Monitor - 2nd Monitor Not Coming Up - Xorg.conf Missing Something?

Oct 19, 2009

This is a repost of my initial problem, I need some one who knows what they are doing more than I too take a look at this command output and give some sort of direction/clue/etc on what I'm doing wrong or missing.

Is my xorg.conf missing some vital line(s) or setting?

My best guess is that i'm missing something to tell the Xserver to use both screens, as the Xorg.0.log does not talk about trying to bring up the intel display; but this is just a hunch.

I'm running kubuntu 9.04 with 2 monitors: on-board intel video and a PCI nvidia display: I am using my nvidia display fine, but still can not get my 2nd display (the intel) working. What the heck am I missing?

lspci:

Code:

Code:

View 3 Replies View Related

OpenSUSE Hardware :: Triple Monitor Setup: X Crashes When Moving To The Second Graphics Card (third Monitor)

Oct 22, 2010

This is a triple-monitor setup with two video cards, where the mouse pointer gets "stuck" if it tries to cross from one video card to the next one. It worked correctly in openSUSE 11.2 and doesn't work in openSUSE 11.3 with the same xorg.conf. This is a 64-bit openSUSE 11.3 with xorg 7.5-11.3 (the openSUSE prepackaged version). I've already tried NVidia drivers 256.53-16.1 (the openSUSE NVidia repository version) and 260.19.12 (the latest off of the NVidia website).

This is the same xorg.conf that I used successfully in openSUSE 11.2. I tried a new automatically generated xorg.conf using nvidia-settings and it had the same problem. This forum won't let me upload the relevant files, but here: [URL] is a tar-ball with my xorg.conf, Xorg.*.log, /var/log/messages, and the NVidia debugging output.

View 3 Replies View Related

OpenSUSE Hardware :: Nvidia 19.29-22.1 Suse 11.3 Dual Monitor Mouse Flickers When Moved To 2nd Monitor?

Jan 15, 2011

just setup suse 11.3 , put on the Nvidia 19.29-22.1 drivers via yast , no kms is set in inetd , nomodeset on grub boot line etc... Even tried installing the driver " the hard way " dual monitors come up, setup xinerama to "Extend" my desktop , and the main monitor ( right side ) is good, visually the left monitor (2ndary) is good.. but whenever I move my mouse over to the left screen the mouse pointer dissapears, flickers along the right hand border of that screen... and if i move the cursor back to the original screen i have to really fight to get it back to the main screen....Copy of my xorg.conf , still very basic...

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 260.19.29 (buildmeister@swio-display-x86-rhel47-04.
nvidia.com) Wed Dec 8 12:27:27 PST 2010

[code].....

View 9 Replies View Related

Ubuntu :: Xorg Doesn't Detect Monitor / Won't Display Higher Than 800x600 On A 1400x900 Monitor

Apr 3, 2010

I installed Karmic on an older PC I had laying around, and the only trouble I am having is with screen resolution. It uses an old ATI chipset (onboard) for video, and it doesn't seem to do EDID correctly, so I can't display anything higher than 800x600. I have tried creating an xorg.conf, but it's still not working. How can I tell Xorg to ignore the fact it can't detect a widescreen monitor and display something larger than 800x600? I noticed the log says the sync's are out of range, but I am not sure how to fix it.

Here is my current xorg.conf.

Code:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

[Code]....

View 1 Replies View Related

Debian Hardware :: External Monitor As The Main Monitor For A Laptop

Sep 22, 2010

I recently installed Debian, using the amd64 Network Install .iso. I'm using XFCE4 as my desktop environment, and everything is working well... on my laptop's screen.

My desired setup is to have my laptop sitting on a well-ventilated shelf, closed, and to have an external monitor be my main monitor. I want this because I'm using my laptop as my "home" computer, so it never moves, and I don't like the keyboard/trackpad. My laptop has a VGA output, and I can get my desired setup on my Windows partition (not stating a preference ; just that the hardware CAN do what I want it to).

I've been working my way around the Internet for a few days, now, and I've got the commercial NVIDIA driver installed. If I run sudo nvidia-config --twinview I can get my external monitor to be part of the display, which is great, but it's part of a dual-screen monitor setup, which is not what I want at all, because (a) XFCE's multiple virtual desktops are good enough for me and (b) my graphics card is integrated, and I'm trying to squeeze every drop of performance out of my laptop that I can (1 gig of RAM; the less that my graphics card eats into it, the better). Plus, it'd be annoying to accidentally drop something on my laptop's screen, and then have to dig it out of the shelf in order to undo it. I'm not saying that I'm consistently clumsy, but I'd eventually end up doing it.

View 2 Replies View Related

Fedora :: F14 Dual Monitor - Firefox Starts On Wrong Monitor

Jan 27, 2011

I just upgrade to F14 from F10 on a dual montor setup. Firefox behaives differently on F14 than on F10.
On F10 it followed the mouse pointer's location and show up on the correct monitor

When maximized at close, it is always displayed on the left monitor. When not maximized at close it will open on the monitor where the mouse pointer is located.

About minimize/maximize Firefoxe before closing and it seems to work in some case, but not for me.

View 5 Replies View Related

OpenSUSE Hardware :: Both Monitor Displays Coming Through On Single Monitor?

Jan 21, 2011

I have just installed Os 11.3, it is my first time to try Linux. Install went fine have Dual Boot Win7 and openSuse 11.3 KDE I have a 26" TFT TV as Monitor 1 DVI and Dell 16" as Monitor 2 VGA all working fine . Autoconfig started and TV display vanished, install finished and went into display settings to check problem and for some reason it is saying both displays are on my 16" Dell. I will Add Screen Shot to show problem. wanted to switch to Linux for years but never had the guts, i was hoping to learn Linux with this distro and when have a grip on it drop windows and use Linux as Primary.

View 4 Replies View Related

Ubuntu :: Change Default Monitor When Dual Monitor Is Enabled

Nov 19, 2010

I have a dual monitor setup in Ubuntu, with my main monitor on the right and the monitor I want to extend to on the left monitor, but I can't seem to get it to do this, it always has the 'desktop' on the left monitor and then extends onto what I want to be my main monitor. I have an ATI Radeon 4350 Graphics card.

View 1 Replies View Related

Ubuntu :: Compiz - Dual Monitor Wallpaper On Single Monitor ?

Dec 10, 2010

Is there any way to put a dual monitor wallpaper on a single monitor configuration using desktop wall? Using only 1/3 or so per wall. Something that will have the effect like the scrolling wallpaper feature on Android/iPhone.

View 2 Replies View Related

General :: Bash - HISTSIZE - Readonly Variable -bash - HISTFILESIZE - Readonly Variable

Dec 8, 2009

On one of my servers I see this when I log in. What does this mean and how can I get it to go away? Everything seems to work fine, but none of my other machines give this error.

View 5 Replies View Related

Ubuntu Multimedia :: Disable Secondary Monitor Quickly Other Than Loading Up Nvidia-settings And Disabling The Monitor Every Time?

Jun 29, 2010

Currently I have two 1920x1080 screens running in Twinview on my Geforce 275 graphics card. Want I want to do is a quick simple way of disabling my secondary monitor when playing video games or using xbmc to watch movies, etc. I've tried a few applets but they require the xandr function which I think Nvidia doesn't support.

Is there a way to disable this quickly other than loading up nvidia-settings and disabling the monitor everytime. I don't really want to use two seperate x sessions and xinerama due to the fact you can't use compositing.

View 1 Replies View Related

Ubuntu :: Disable Compiz On One Monitor In A Two Monitor System

Feb 23, 2010

I have persistent video tearing my second monitor (Mitsubushi HDTV). I have tried everything that was suggested with some improvement. I have no issue with tearing if I add the following to my xorg.conf

Quote:

Section "Extensions"
Option "Composite" "Disable"
EndSection

Is it possible to disable composite for one monitor only and keep it for the other. Or at lease is it possible to have compiz for one monitor only and disable it for the other.

View 2 Replies View Related

Programming :: Bash: Printing The Line Number In Bash Script?

Feb 4, 2011

I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.

View 3 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved