Programming :: Monitor A File When Ever Anything Updates?

Jan 25, 2010

I am looking for a way to monitor a file, when ever anything updates. an email gets generated

View 1 Replies


ADVERTISEMENT

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

Programming :: Getting A Script To Continuously Monitor Appended Data To A Log File?

Oct 13, 2010

Code:

if ! [ -f ${PATH}/myfile.txt ];then
echo $(date +%Y%m%d"_"%H%M%S)": Nu am gasit fisierul ${PATH}/myfile.txt"
ps -fxu pin | grep "/usr/local/coreutils/bin/tail -f ${LOG_PATH}/x.log$" | awk '{system("kill "$2)}'
cat ${LOG_PATH}/x.log | sed -n -e '/LONG/{x;1!p;g;;}' -e h > ${PATH}/myfile.txt

[code]....

I have a continuously growing log file (x.log) in which i have to look for certain lines that contain "Long". The line above each line containing the word "Long" it contains a time stamp. I want to extract each line containing the time stamp into myfile.txt and check the difference between time stamps. Whenever there is a difference i need to run another script (${CAL_PATH}/${APP_NAME}), then sleep 1, then continue searching. Lines with "Long" do not appear continuously, but in blasts. The script runs fine until the first pause encountered. Starting with the first pause, tail -f doesn't write in myfile.txt anymore. Can someone help me understand why "tail -f" it stops writing into myfile.txt? Or does someone know an alternative to "tail -f" of achieving the initial scope of the script?

View 5 Replies View Related

Fedora :: Monitor Refresh Rate Problem After Mar 6 Updates

Mar 8, 2010

I'm having a problem with my monitor's refresh rate after the most recent round of updates issued on March 6. When I login after a period of inactivity my monitor's refresh rate is set at 60 Hz, even though I always keep it set at 85 Hz.So I have to go in and change the refresh rate back to 85 Hz every time I log in to my computer.This has only started happening after the most recent updates.I tried downgrading X to a previous version but that did not fix the problem. I have an Nvidia graphics card and am using the Nouveau driver.Is anyone else having this issue? Does anyone have any ideas on how to fix this?

View 6 Replies View Related

Programming :: Codeblocks Doesnt Run After Installing Updates?

Dec 2, 2009

I am using ubuntu ultimate edition 2.4(karmic). I installed codeblocks a few weeks ago.It was working fine.But today i installed updates and now it doesnt run.When i click it to start then it says starting codeblocks for sometimes and then nothing happens.I tried to open it from terminal and i found this message

/usr/share/themes/Cylon Eye '72/gtk-2.0/gtkrc:79: Unable to locate image file in pixmap_path: "Others/focus.png"
/usr/share/themes/Cylon Eye '72/gtk-2.0/gtkrc:82: Background image options specified without filename
codeblocks: relocation error: /usr/lib/libcodeblocks.so.0: symbol _Z18wxSafeConvertWX2MBPKw, version WXU_2.8.2 not defined in file libwx_baseu-2.8.so.0 with link time reference

View 2 Replies View Related

Programming :: Rsync - Script To Compare Files And Transfer Updates

Oct 4, 2010

I need to create a script that will compare the differences between two folders and then to copy only the updated and new files only to another directory. I know I need to use rsync here, I can write scripts so really it not how to create a script it is how do I accomplish the transfer of only new or changes files between two folders to a new file. Do I need to link these two folders first and then use the "--compare-dest" switch.

View 8 Replies View Related

Ubuntu Installation :: ISO File With Most Recent Updates

Jan 3, 2010

After not having used Ubuntu for a few months now, I want to make up a new LiveCD and possibly a bootable USB. The times I have done this in the past, the installations don't include recent updates which need to be downloaded and installed once the system is running. (Understandably)

Two questions:

1) Does Ubuntu update the downloadable ISO periodically to include recent updates?

...for example: Now that it is January (ie. some 3 months after release of Karmic in October '09 and some 200-300Meg+ of updates required since that time), will I be downloading an ISO from Ubuntu that has recent updates already as part of it, or will it still require updates to be downloaded and installed once Ubuntu is running on the computer?

2) If the downloadable ISO has not been updated since Oct '09, is there a way of making a LiveCD/bootable USB that has up-to-date updates already installed? (if you know what I mean?) ....and is this process relatively simple?

View 9 Replies View Related

Ubuntu Installation :: Save Updates To A File On A Machine Without Internet?

Feb 14, 2010

I am trying to install Ubuntu to a computer with out an Internet connection and I need a way to get the updates on it. So I have a two part question how do I backup or save the updates I normally get from the update manager to a file or disk and how do I install them on the computer without the internet connection?

View 1 Replies View Related

Ubuntu Security :: Automatic Updates Of Clam Signature File?

May 8, 2010

Is there a way to make Clam update the signatures automatically? I cannot see an option in Clam TK.

View 1 Replies View Related

Ubuntu Installation :: Exporting LATEST Updates (deltas) To File?

Sep 20, 2010

I have Alienvault (which is debian based) running on an offline network. I need to have a repo server on that network in order to provide updates/other installation sources. Currently I have configured Ubuntu Server 10.04 as an apt-mirror on an internet-connected network.

What I need to do is find a way to automatically take the newest updates, and export them to disk. I need to mirror the internet-connected-repo server on the offline-network side. But I don't want to burn all 40 gigs or so every time new updates come out. Basically, I'd like to perform incremental backups of the mirror after the first full backup. Is it possible to automate this daily?

[Code]...

View 8 Replies View Related

Programming :: How To Determine If VGA Monitor Plugged In

Sep 2, 2010

Does anyone know a way (hopefully a standard/generic way, e.g. through sysfs the interface) to determine if a VGA monitor is plugged in on Linux?

View 2 Replies View Related

Programming :: How To Monitor The Applet Development

Sep 20, 2010

The embedded hardware is working nicely, and even the antique laptop is now running smoothly using tinycore linux. The device pumps out packets of data at roughly 128 bytes/second (two packets, one 56 bytes, the other 72, alternating every 500mS).

I'd like to create a more general purpose application for monitoring the data being logged. It is a simple matter to have the back-end application write a log file of incomming data, or be a little more sophisticated and just write out changes from the previous packet. The difficulty is that the existing curses-based cli application reads directly from the serial port and can only be run from one place at a time. Once data has been pulled off the port it's not available any more.

A database for logging the data is not necessary, as the application would mostly be used for auditing material consumption, not tracking minute-by-minute usage over any length of time.I could have the existing back-end app. write data to a file accessible through a web server, and allow interested parties to download the information. This would be greatly enhanced by a small front-end app. that can request the data and format it for a more sensible display. Alternatively, is there some way to open a socket (I'm out of my depth here) so a free-standing application could simply request the data, and do the front-end formatting? This presents problems in that it wouldn't be multi-platform capable.

View 2 Replies View Related

Software :: Live - Real-time Text-file Updates In Terminal

Jan 13, 2010

I want to have a terminal open and have something like a "repeating cat" command running in it for a certain text file (in particular /var/log/system.log). So my terminal will scan or cat the text file every so often or whenever the text file system.log gets written to by the system, it will display whatever it wrote to the file in my terminal that is open.

View 2 Replies View Related

Programming :: Monitor A Folder For New / Change Files?

Aug 30, 2010

how I can monitor a folder and get the name of newly created files or files that their size is changing? (in Perl or Linux shell script)

View 5 Replies View Related

Programming :: Need To Monitor Samba Share Access

Jul 1, 2010

i want to do a script that check samba shares with command smbstatus and see if one of the folders is accessed by unauthorized user by comparing with list of authorized users.

View 5 Replies View Related

Ubuntu Installation :: Install Updates Returns To Main Window Without Installing Updates

Mar 24, 2011

For some reason Update Manager is not installing updates as of yesterday.I have it set to check daily and notify if updates are available. It has been working without issues for well over a year now.

Update Manager tells me updates are available and presents the list of security, recommended, and other updates. All are selected to update, but when I select Install Updates in Update Manager it returns with a Reading Package Information window overlaid on the main Update Manager window - building dependency tree then reading state information and dumps me back to the main Update Manager window without performing any update actions.

View 2 Replies View Related

Ubuntu :: Community Repo Updates / Canonical Does Not Provide Updates For Warsow?

Dec 20, 2010

I just learned that warsow 0.6 is out, and went to see if it was available in the ubuntu software center yet, as opposed to going and downloading and installing it manually from the warsow website. The ubuntu repo's still have version 0.5, and at the bottom of the page it says:

"Updates: Canonical does not provide updates for Warsow. Some updates may be provided by the Ubuntu community."

So if I wanted to 'update' this item in the repo's for the better of the community what would that entail?

View 2 Replies View Related

Programming :: Can Probe Monitor Multiple Instances Of Tomcat

Jan 31, 2011

I'm using Probe to monitor Tomcat5. The problem is that I've multiple instances of Tomcat.Can be used Probe to monitor multiples instances of Tomcat without having to deploy it to each instance?

View 2 Replies View Related

Programming :: Monitor When Files Are Copied To Another Volume And Log The Date?

Jul 29, 2010

I'm pretty sure I'm in over my head with this one. Here's the situation: My practice has been, after downloading and making changes to files, to use a certain GUI cataloging app to move them to categorized sub-folders inside one "umbrella" folder, then copy them to (what are in most cases) identically-named sub-folders in another one on the same HD. Emulation of this process on the command-line would look like:

Code:
cp holytrousers.jpg /home/metoo/Pictures/fancypants/
mv holytrousers.jpg /home/me/Pictures/pants/

This was in anticipation of making a "twin" of the second, now bigger, "umbrella" folder on anexternal HD and continuing the practice. At some point I intended to get rid of the original 2nd "parent folder" and just keep the first one on the drive with my OS install, using the twin on the backup folder as I'd been doing when it was on that same drive.

I'm very close (a matter of 2 to 3 weeks, it looks like) to getting a backup/external drive in a reasonably-reliable external enclosure. With the backup, originally the "twin" of the bigger "umbrella" folder and its sub-directories, on that other drive, I also anticipate that I will likely go at least a few days between backing up any new files to it.

For the sake of argument, let's say I gave the external the name "tuxs_twin". Is there any way to monitor copying activity from /Pictures/ on the boot HD to /media/tuxs_twin/Pictures/ and log the dates and times, then have something running that checks the log every so many hours and puts up a reminder dialog saying /tuxs_twin/Pictures/ hasn't had any new files copied to it since date X at time Y? I hope this was clear enough. If not, I'll try to break it down further when I know which details are confusing folks.

View 2 Replies View Related

Programming :: Write DOS Script To Monitor The PC's Network Status?

Jan 15, 2010

There are a few PCs on the network that lose network connection every so often -- sometimes these old beasts have a power failure and owing to a bug in the BIOS the NIC doesn't necessarily initialize properly, which requires a reboot to correct it. Got me thinking of a band-aid -- have the PC ping a specific IP address, and if it cannot ping then it forces itself to reboot.

IF I were to write it in BASH I'd do it like this:

#!/bin/bash
HOST=<some meaningful hostname or IP address>
for ipaddy in $HOST
do
count=$(ping -c 1 $HOST | grep 'received' | awk '{print $4}')
if [ "$count" = "0" ]; then
sh usr/bin/reboot
fi
done

In English: send 1 ping to the IP address. Grep through the results to see how many of 1 ping was returned. IF it returns 0 pings then reboot. I'm sure the reboot command would have to be groomed a bit for sudoers but that's beside the point here.

So, HOW do we write something like this for DOS? Stop giggling (lol). No really, I have Windows 2000 & XP machines that need some sort of script or method of knowing (at intervals) of when they're not talking to the Host system, and need to reboot to fix it. I was thinking to write a simple test script, drop it on each of these machines and use the Windows task scheduler to run it every 30 minutes.

View 3 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

Programming :: Monitor Temps And Values Fed In From A Data Acquisition Device

Feb 7, 2010

I'm thinking of a web based app that will monitor temps and values fed in from a data acquisition device but am seeking advice on what to use to produce the web page would php be powerful enough? The app will also have to have access to a shell for scripting, I know thats a security risk but it will not be in an exposed env. The web page will have a series of lcd readouts displaying the aquired data refresh rates will probably be around 5 seconds along with control buttons to turn on and off values. Storing data in a mysql database for statistical reports would be needed eventually. Ubuntu 9.10 will be the os. Is python easily integrated into apache?

View 2 Replies View Related

Programming :: Shell Script To Monitor Files Created On A Folder

Aug 27, 2009

Can someone please help me on how can i create a script that will monitor file creation on a single folder and sending the newly created file on a separate folder? Only the new created file must be transffered or copied to the other folder. The old ones remains.I urgently need this for production deployment.

View 8 Replies View Related

Ubuntu :: Removing Updates From Updates Manager List

Jan 29, 2011

There are some updates in the Update Manager list which I do not install. Among them, some drivers for HP Printers (I don't know why this cropped up; I don't even use printers on my laptop), and gcj updates (I use gcc/g++ but not gcj). I unchecked them the first time I saw them on my UM list. However, for every subsequent batch of new updates, UM retains these updates and I need to uncheck them every time. How can I remove them totally from my UM list?

View 2 Replies View Related

General :: How To Monitor Changed File

Jul 3, 2010

How do I monitor which files have been changed after, say, I run the passwd command? (I know, depending on the options used, it changes /etc/shadow and/or /etc/passwd). But I would like to if there is any clever ways of monitoring this. This is how I do it which is a bit crude, and I have to know which directory to monitor. Before running the command, I run

Code:

for i in $(ls -A) do; md5sum $i >> /tmp/before; done

And after running the command, I run

Code:

for i in $(ls -A) do; md5sum $i >> /tmp/after; done

Then I do a diff to see if any file has been changed

Code:

diff /tmp/{before,after}

View 1 Replies View Related

CentOS 5 :: Should Use Monit Or Mon To Monitor A .pl File

Dec 27, 2010

I have a perl program that I need to an eye on so it run 24/7 and restarts if it stops at any time. I have Webmin installed and I am looking into Mon but it seems it only monitors services like "httpd" and "smtp" rather than a file.pl file which runs. Actually the file creates a pid.log in /var/log/ which has the PID number in it.

Since Monit doesn't come on webmin I am not sure what I need to put in it's config file to monitor my file.pl.

View 3 Replies View Related

Ubuntu Networking :: How To Monitor File Access

Jan 5, 2010

Karmic 9.10 x64 Gnome. On my home LAN, i want to be able to monitor what files are being access on my local machine. I had a quick look at wireshark, but it didnt do exactly what i wanted. I have a share directory, read-only, and often divx files are streamed directly from it rather than copied first. I want to be able to see what user is accessing what file. Should be a fairly simple task, but im just not sure how its done.It can be terminal based, doesnt have to live and constantly updating, just a report. But a prog with a GUI would be useful too.

View 5 Replies View Related

Software :: Monitor A Specific Log File Using Zenoss?

Oct 10, 2010

I want to monitor all messages of a specific log file using Zenoss Core. How can I do this?

System :

Centos 5.5 (x86)
Zenoss Stack 3.0.2

View 1 Replies View Related

Ubuntu :: Download Updates Not With Updates Manager?

Feb 9, 2010

updates manager constantly crash i tried gnome in safe mode and it doesn't work so i need some way to update the os untill hopefully one update would fix the update.

View 5 Replies View Related

Ubuntu :: Automatic Updates - Not JUST Security Updates ?

Mar 25, 2011

So, it is my understanding that Ubuntu's automatic updates do not install ANY updates that are not "important security updates." For example, it did not upgrade me to Firefox 4 automatically; I had to do it myself (Don't all new browser versions usually contain new security features/patches? Oh well...That is a separate question entirely).

ANYWAY, is there some way to get the latest stable versions of all of my open-source software automatically (or at least all at once, on command), instead of just security updates? It seems silly to have to install new versions for every program manually.

Also, related/side question: Now that I have installed Firefox 4 myself (via apt-get by adding the mozilla-stable PPA), will I stop getting security updates for Firefox through the standard Ubuntu update manager?

Actually, a really thorough explanation of the whole automatic update system (or a link to one) would be great too.

View 2 Replies View Related







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