General :: Utility To Continuously Monitor An Arbitrary Command?

Mar 18, 2010

I seem to recall there exists a small UNIX tool to repeatedly execute and display the output of another command at a given interval.

Kind of like "top" works by default but then for any other command.

Does anybody know such utility?

View 1 Replies


ADVERTISEMENT

Ubuntu :: Edit Startup Scripts To Add An Arbitrary Command?

Oct 11, 2010

sometimes you want to run a command every time computer boots up. In DOS there is "autoexec.bat" in windows - "Startup" menu and I'm sure that there is a similar thing exists for Ubuntu, but that's not what I'm after.These things above will run a command when a user logs on. I want to run a command when a pc boots up. This is not straightforward in Windows, but since I'm a windows guy I can do this. I can install a command as a service with srvany utility that will make sure it will execute on boot up.Now I want to do a similar thing in ubuntu. how do I edit startup scripts in ubuntu to add an arbitrary command? I need to run the command in the context of a particular user, so I normally do it like this:

Code:
sudo -u myServiceUser -i myService

But I want as little downtime as possible and sometimes it takes sometime to find out that there has been a reboot, get to a computer and run the command manually. If I could run this automatically on bootup I wouldn't have this problem.

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

General :: Command Line Utility To Read Info From An Iso?

Nov 16, 2010

I am trying to find a linux cmd line utility that will read info from an iso file. The problem I have is that the file is always corrupt so I cannot mount it because I only have around 100k of it but all I need is to extract the headers of what the iso contains. how I can achieve this I have searched the internet with no look at all.

View 1 Replies View Related

General :: What Is Difference Between Power Broker Utility And Sudo Command

Aug 11, 2011

I just wanted to know the difference between Using Sudo mechanism over using Power breaker utilities.

View 4 Replies View Related

General :: System Command Line Utility For Watching Log Files Live?

Jan 5, 2011

What's a good linux command line utility for watching a log file live? It's probably obvious but I totally forgot it.

View 2 Replies View Related

General :: Using Gnokii Utility - Copy Command As Copying Files To Home Is Not Allowed

Mar 16, 2011

iam trying to send sms using gnokii utility in linux firstly i did sudo apt-get install gnokii after that i got a gnokiirc.gz file in /usr/share/doc/gnokii/sample/gnokiirc.gz file here after that i did gunzip gnokiirc.gz then i transferred my file from the /usr/share/doc/gnokii/sample to home directory by using copy command as copying files to home is not allowed so i used sudo sudo cp gnokii /home after that i changed the port=/dev/ttyUSB2 and model=AT in the gnokiirc file in the home directory and then i wrote gnokii --identify

[Code]....

i followed as in the [URL] and [URL] and except this "Note that you will need read/write permissions on whatever serial port you specify in .gnokiirc."(iam confused what is my serial port is it ttyUSB2)

View 7 Replies View Related

General :: Unpredictable And Arbitrary Crashes When Typing An Email

Jan 13, 2011

I experience unpredictable crashes, When typing an email I am unable to recapture that which I wrote. without warning the "back" button disappears. it is sometimes there and sometimes not.

View 3 Replies View Related

Software :: Utility To Monitor What's Accessing The Hard Drive - Laptop_mode Keeps Cycling

Nov 20, 2008

I'm trying to implement laptop_mode (to put disk to sleep when not in use), but something keeps waking it up. 'TOP' really doesn't do the trick.

This is apparently a known problem. Has to do with disk idling not implemented correctly.

[url]

View 1 Replies View Related

General :: An Equivalent Of XFCE "verve Command Line Utility" For Ubuntu Maverick?

Jan 11, 2011

Is there an equivalent of XFCE "verve command line utility" for Ubuntu Maverick?

View 3 Replies View Related

General :: Generate Random List And Determine Size Of Arbitrary Block Of Files In Dir?

Mar 4, 2010

I want to generate a temporary random list from a directory of files and then determine the size of an arbitrary block of files from this list (say 1-25 or 26-50) and add their names to a file along with some other info for each name. I can generate a random list with file sizes like this: ls -l | sort -R | cut -d " " -f 6 but i'm not sure how to add up the sizes of just a certain block of these files and at the same time save the file names.

View 2 Replies View Related

Ubuntu :: Command To Install Disk Utility App In Kubuntu?

Nov 9, 2010

What is the command to install Disk Utility Ubuntu app in Kubuntu?

View 4 Replies View Related

Software :: Command Line Disk Partition Utility ?

Jan 10, 2011

Before I go off and write a new one, does anyone know of a good command line disk partition utility that works better than "parted"?

View 5 Replies View Related

General :: Terminal Command To Monitor System Performance?

Jun 3, 2010

Is there a terminal command to monitor CPU and/or RAM usage?

View 8 Replies View Related

General :: Script To Monitor Port For Active, Then Send Command?

Mar 28, 2010

I need a script that would continuously monitor one port and when it is active (not listening or waiting) execute a series of commands to standard output.I am familiar with netstat but am not good with scripting so

View 15 Replies View Related

Networking :: User Level Command/utility To Find The Bandwitdth Used By A Process?

Aug 5, 2009

I am searching for a Linux user level command/utility to measure the network bandwitdth used by a specific process by usig its process id.i used different commands like, iperf, ntop, netstat etc, but it doesn't to meet my requirement. i need to observe network bandwidth used by only a specific process .

View 3 Replies View Related

General :: Ssh: Continuously Synchronize Files, One Way?

Aug 1, 2011

Scenario: An IDE is set up on a Linux desktop box, editing PHP files locally. Every time I save a file, I want this change to appear on the linux server where Apache is running. The server has ssh (and samba and nfs for that matter).As a reference, when I edited files on Windows, I finally came over WinSCP as the exact tool I needed - WinSCP have just this feature present, with initial synch and then continuous update, using the filesystem watch service: "Keep Remote Directory up to Date".

On Linux, one could argue that sshfs could be employed to sidestep the need for synchronization entirely. On windows, a samba-share would do the same. However, I want the IDE to work with local files (on a SSD disk!), not having to go over the network to do PHP indexing and whatnots, which takes ages.But sshfs might be a part of the solution nevertheless - so that the continuous synchronization just needed to be done between two local directories.

View 5 Replies View Related

Ubuntu Installation :: Cpuid Utility Is Not Compiled With U9.04 And Utility Is Not Available As Package With Synaptic?

Feb 5, 2010

cpuid utility is not compiled with U9.04 and the utility is not available as a package with synaptic -
other distributions have it available as rpm . url

Any way to run this utility in the Debian world?

View 2 Replies View Related

Debian Multimedia :: Command Line Utility To Give Info On Video Files

Nov 17, 2010

Is there a command line utility to tell me about what's inside a video file? Say I have a .mpg file. I want to know about the video stream and the various audio streams, the codec used for the video stream, the bitrate of the video stream, and so on.

View 5 Replies View Related

General :: CPU Fan Running Continuously On A Laptop / Is It A Problem?

Sep 13, 2010

I have dual boot on my machine - Windows Vista and Fedora 12.

I have noticed that while I am on Vista, the fan runs only intermittently, but while I am on Fedora, it runs continuously. I have tried to tweak the power and CPU settings for Fedora, but did not get anywhere.

Should I be worried that the fan is running continuously? Or is it okay, the fan is just doing its job?

View 4 Replies View Related

General :: Find Continuously Growing Files In The File System?

Apr 23, 2010

How to find continuously growing files in the file system?

View 11 Replies View Related

General :: Creating Watch On One Directory In Which Files Are Continuously Coming?

May 4, 2010

Actuaaly i am creating watch on one directory in which files are continuously coming.Is there any command which can give listing of all files who have come in last 24 hrs.

View 8 Replies View Related

General :: Bash Script To Continuously Ping Server And Send Email

May 7, 2010

I'm trying to write a script that will continuously ping a server and then send out an email when the server is down, and then when it is back up. Then, continuing with monitoring. I would like to not run this in cron, because I don't want to script to run with multiple instances.

For example,
Ping a server every minute.
-If successful, do nothing.
-If failed to ping, then send out email stating that server is down.
-Once ping is successful, then send out email stating that server is up.

I only want it to send an email once after a failure, so the end user isn't get an email every minute that it fails. Once it is successful, then send the email (one time), stating that the server is up. Then, continue to ping and if fails again, repeat the process.

View 4 Replies View Related

General :: Ubuntu 9.10 Suddenly Disk Drive Is Running Continuously - NonStop?

Apr 29, 2010

My system: Ubuntu 9.10/gnome Gateway SX2802 with Intel Q8300, 4GB ram, 750GB drive only 6 months old. My internal drive is read/writing continuously without stopping no matter what I am doing. It begins immediately after boot. It simply runs and runs nonstop. This is with NO APPLICATIONS running. This is a problem which cropped up suddenly after 5 months of running just fine. What I have tried:

1. Disconnecting Internet - no change

2. Looking at processes in System Monitor. Well, everything says "sleeping" and there isn't anything that looks obvious to me, but there are a LOT of processes. I am afraid my drive will simply burn up.

View 3 Replies View Related

Networking :: Port Forwarding To Arbitrary Address?

Feb 8, 2010

Is it possible to forward a connection to a port to a completely unrelated external address? For example, I want to redirect ssh traffic to a.b.c.d to w.x.y.z. If w.x.y.z were an internal address and the machine was the router, this would just be plain old NAT port forwarding. But what if w.x.y.z is not an internal address? The reason I want to do this is I want to reassign a domain name example.com from ip address A to B, while allowing users to still ssh into A by using the [URL] domain name. Is this unreasonable? (I am guessing it is unreasonable, since the A wouldn't have it's gateway set to B, as is the case if A were in B's NAT'd internal network.)

View 2 Replies View Related

OpenSUSE :: KDE4.4.5 - "Run Command" Utility Doesn't Show Buttons

Jul 11, 2010

For some time now, that the "Run command" window (which pops up when clicking alt+F2) doesn't show the 4 buttons, it shows just an empty black rectangle.

I have another system which is installed with the same kde4.4.5 rpms and I don't have this problem. I went over kde configuration files and can't find the cause.

Attached is a snapshot or the problem :

I recently noticed that when pressing alt+tab to scroll between windows, only the icon of the window is highlighted when in the 2nd machine there is a bounding box which the surrounds the icon and the text.

View 6 Replies View Related

Debian Multimedia :: Iceweasel Crashes When Opening Arbitrary File

Nov 21, 2015

my Iceweasel always crashes when I attempt to open any file (usually pdfs, but I tried with .odt too). I only found this thread [URL] .... and commented out as told by MekkaGodzilla in /etc/gnome-vfs-2.0/modules/default-modules.conf Coment out this line : file:file

View 14 Replies View Related

Server :: Apache 2.2 Configuration - Arbitrary Domains Redirection Allowed

Oct 20, 2010

I try to fix bugs on my web server. The remote web server allows redirects to arbitrary domains. Description : The remote web server is configured to redirect users using a HTTP 302, 303 or 307 response. However, the server can redirect to a domain that includes components included in the original request. A remote attacker could exploit this by crafting a URL which appears to resolve to the remote server, but redirects to a malicious location.

View 1 Replies View Related

Ubuntu :: BASH Script - How To Stop Loading Files At Arbitrary Number

Aug 9, 2010

I have the following code in bash script:
Code:
#!/bin/bash
COUNT=1
# bash until loop
until [$COUNT -gt 2]; do
pq A$COUNT [Pemptus].pq &
let COUNT=COUNT+1
done

I did this because I'm that much of a Progress Quest geek that I wanted to have a huge group on the online server, so I decided to make a script that would open all the files for me rather than having me do it manually. I created some characters with the boring name of A1, A2, etc. When I ran the above script, it went into a continuous loop and I had to halt it, then run sudo killall pq.exe to eliminate the 500 or so Progress Quest windows that popped open. Anyway, what is wrong with my script that I can't seem to get it to stop loading files at an arbitrary number? I want to get this part finished before I make any more boring named characters.

View 1 Replies View Related

Ubuntu Networking :: Ping To Offline Host Returns Arbitrary Ip Address?

Mar 17, 2011

A brief description of my network:It is a small home network consisting of an Ubuntu 10.04LTS server edition, an Iomega ix2 NAS, a WinXP pro server and several family laptops.This is all routed through a Netgear WNDR3300 home router. All are assigned IP's via DHCP and all but the laptops are static (via DHCP though). The WAN address/DNS is assigned via DHCP from my ISP.The problem:When one of the machines is offline, Ubuntu does not resolve the netbios name correctly. No surprise here. But what is happening is that it is finding some arbitrary machine on another network. Below is what a ping to an offline host reveals:

Code:
ping -c3 hostname
PING hostname (204.232.162.92) 56(84) bytes of data.

[code]....

View 9 Replies View Related







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