Programming :: Script To Test If Program Is Running

Sep 22, 2010

I'm trying to test whether wget is working still or not. While [ wget is still running ] <----- but how should this look please?
do
codes
done

View 4 Replies


ADVERTISEMENT

Ubuntu :: Test Program Not Running On Openmoko Phone

Dec 3, 2010

I am running ubuntu-9 on i686 and cross compiled simple hello.c program with arm-linux-gcc (handheld/arm-linux-gcc-3.3.2.tar.bz2]) for arm , but unable to run it on openmoko neo free runner phone.

View 1 Replies View Related

Programming :: Test Program To Get The CPU Utilisation

Mar 9, 2010

I wrote a test program to get the CPU utilisation. I hope to extend it to take cpu utilisation on multi core machines. Hear I used the equation for taking cpu utilisation given at [url] of JmSchanck post. But when I match the output of my program against 'top' and 'system monitor' output it seems quite high. Sometimes cpu utilisation goes more than 100%.

So the given equation in that url is correct? can anyone give me the equation to take CPU utilisation?

Code:

View 3 Replies View Related

Programming :: Passing Input To Program For Test

Apr 13, 2011

I started to run a C++ my program in Linux and I don't know how to test my program that works fine with a text file. This is a project for my uni and to explain more clear, My program is a sample database for modify or add and search and it read data from a binary file and also write into a binary file. I have got an input from my lecture and she said after compiling in Linux I must write:

1-to compile:
Code:
g++ (files with cpp)
2-to see the output:
Code:
./a.out
3-to test with input:
Code:
./a.out < input.txt >

My problem is in step three. What I must write in the command part after" step2" to see the output?

View 3 Replies View Related

Programming :: Test Program Without Making A Copy Outside The Git Working Dir?

Jan 30, 2010

I was windering, if you are writing a C program, I don't think you are supposed to commit the .o files and executables. How can you test your program without making a copy outside the git working dir?

View 3 Replies View Related

Programming :: Simulate A Serial Protocol In User Space Program To Test Reception Algorithm?

Jul 28, 2010

I want to simulate a serial protocol in user space program to test reception algorithm. The protocol is similar to UART protocol but frame format is different. The duration of 1 bit is 114,46 us. In my main function I'm creating two threads. Tx for simulating transmitting data and Rx for reception data. For measure time I use create_timer() function and signals. Each thread has its own timer and signal handler. Tx timer uses SIGUSR1 and Rx timer uses SIGUSR2. Tx thread sets the global variable and Rx reads it.

The timers are set to sample with 114,46 us period. When they reach this value signal handler should set the flag. Flag is check in thread and some operation are made. When I set the timers period for longer time (100 ms) everything works fine but when I change it to default value (114,46 us) the Rx thread doesn't receive the proper data. I am wondering if the 114,46 timer period is possible to simulate in user space? Whether the time will give me the proper resolution ? Theoretically it should provide 1 ns resolution.

View 3 Replies View Related

Programming :: Getting A Snapshot Of A Running Program?

Nov 17, 2008

I am trying to use perl to run a program using the eval command but the program runs infinitely, i just need it to run basically for one second, stop then give me the output. I tried using fork but it does not really work. The child process is not being killed.

my $pid = fork;
if ($pid == 0) {
my $results = `ngrep etc...`;

[code]...

View 6 Replies View Related

Programming :: Running C Graphics Program?

Sep 18, 2010

i want to run c graphics program on linux for that i want to install[URL]but i dont know how to install this graphic file on linux to make it un.

View 1 Replies View Related

Programming :: Running Program In Background From Script

Mar 27, 2011

I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes longer than five (5) minutes and this is causing problems when running the rest of the steps in the scripts. Can anyone suggest how to re-program my script. At the moment, the KSH script, i.e. test.ksh, is doing as below:

test.ksh:
.....
.....
xxx/xxx.ksh <--- program/script called by the script
sleep 300
..... run the rest of the script .....
..... problem is sometimes xxx/xxx.ksh takes longer than 300 seconds .....
..... any way that I can monitor that xxx/xxx.ksh finishes before I run .....
..... the rest of the scripts .....

View 3 Replies View Related

Programming :: Detect Pipe From Running C Program?

Jan 24, 2009

I'm looking for a way to detect whether or not a program has been called from pipe, e.g.

Code:

whatever | my_program
versus simply just being exectuated directly:

Code:

my_program

Why? In the first case, I want to run the program non-interactively, and in the latter case I want to print out user-friendly messages. I've been thinking along the lines of some check I haven't yet found, like:

Code:

if( stream_buffer_is_not_empty() )
print_interactive_messages();

View 1 Replies View Related

Programming :: Possible To Know The Amount Of Memory Used By A Program Before Running It?

Mar 3, 2009

I would like to know if there is a linux command to verify the amount of memory used by a program. The programs I am using were compiled with gfortran.

View 2 Replies View Related

Programming :: Running External Program On Same Processor?

Mar 2, 2010

The situation is that I have an MPI-parallel fortran program. I run it and it's distributed on N processors, and each of these processes must call an external program.

This external program is also an MPI program, however I want to run it in serial, on the processor that is calling it, as if it were part of the fortran program. The fortran program waits until the external program has completed, and then continues.

The problem is that this external program seems to run on any processor, and not necessarily the (now idle) processor that called it.

how I can call the program and ensure it runs only on this processor?

Extra information that might be helpful:

If I simply run the external program from the command line (ie, type "/path/myprogram.ex <enter>"), it runs fine. If I run it within the fortran program by calling it via

CALL SYSTEM("/path/myprogram.ex")

it doesn't run at all (doesn't even start) and everything crashes. I don't know why this is.

If I call it using mpiexec:

CALL SYSTEM("mpiexec -n 1 /path/myprogram.ex")

then it does work, but I get the problem that it can go on any node.

View 2 Replies View Related

Programming :: Running A Program With Arguments Using A Shell Script

Jul 14, 2011

Running a program with arguments using a shell script

View 1 Replies View Related

Programming :: Sending Keystrokes From C Program To Certain Running Applications?

Jan 13, 2010

My requirement is to save files before shutting the Linux machine down, unattended ie: when the user is not near the machine. This is done whenever the UPS battery is about to die, so that the files get saved. open-Office/text-editor applications that can be saved using keystrokes will have to be found from the running processes and keystrokes should be sent to them from a C program that was started in non-graphics stage. ie: from a C program that forks into memory as a daemon before xwindows part starts. How to I send keystrokes to a running application? (like cotrol + F and then wait and then send next set of keystrokes till the file is saved as a new file or as the same file itself), either from C program or a script?

View 1 Replies View Related

Debian Programming :: Memory Usage When Running Java Program

Jun 28, 2013

I have a java program that runs on Debian as a background processor. Yesterday the Java program stopped running. I looked at the memory usage, the system only had 5MB memory left, so my guess is that the java program ran out of memory to use.

However, after we restarted the java program, we could see that the free memory count started to go up. It kept going up from 5MB to over 400MB. The increase of memory happened slowly, when I measured it, I could see that with each minute passing by, there were a bit more memory added into the free memory pool, and meanwhile, the java background process was running.

I wonder why this would ever happen. It's as if our java program first brought the machine done because it consumed all the memories, then after restart, it starts to give back memories.

View 2 Replies View Related

Hardware :: Program To Test DVD Burner

Mar 2, 2010

I'm in doubt whether my dvd burner is working properly. Do you know of a free of charge program to test it fully?

View 2 Replies View Related

Software :: Bluetooth Want To Test Program I Am Working On?

Jun 6, 2010

Basically, it is a Bluetooth scanner that is designed to do just one thing, scan for discoverable devices in range and record their MAC, name, and the time/date they were found to a log file. There are only a few options, it is pretty much a set it and forget it sort of thing. The only requirements are BlueZ (3.x or 4.x), and that your computer has a Bluetooth device that is supported by Linux.

Obviously you will also need at least one device to scan for, and the more the better. If you want to take a walk through your mall while running it and seeing what you found, I would be ecstatic. A word of warning, I am not a very good C programmer and I have no doubt that there are mistakes in the code and improvements that could be made. You can download the source and get a little more specific information about it from: [URL].

View 10 Replies View Related

Software :: Test / Cleanup Program For Ubuntu System?

Apr 9, 2010

Have Ubuntu & it was working well, but has become slow, 'greys out' on me regularly - eg. pic loses colour & nothing will respond for a few or more seconds. Also 'Ubuntu Software Centre' & "Synaptic' thingy come up with errors, saying can't install or uninstall progs. Although it seems they may do it OK despite saying they can't. Have Computer Janitor installed, but this is no longer working at all. So... is there a program or such that I can use to test/clean out the system?? For that matter, is there a program for testing hardware, as I'm not sure if it's an indication of unhealthy hard drive or such?

View 1 Replies View Related

General :: Why Does Running A Program In Bash Work, When Running It In The Menu Doesn't?

Jul 26, 2010

I presume there is something in the JWM window manager - or Puppy Linux Lupu 5.01 itself that is conflicting with the normal loading of GMPLAYER....

I would like to know how to troubleshoot, and fix this problem if possible (even a workaround would be great).

View 1 Replies View Related

CentOS 5 :: Can Test Website On PC Without Running Any Stack

Oct 20, 2009

I have Centos 5.3 installed on my pc. I have mysql, PHP and apache server running on my computer too.Is there any way I can test my website on my pc without running any stack ( lampp )?

View 10 Replies View Related

Software :: Finding A Network Performance/stress Test Program?

May 14, 2010

I'm looking for a Linux program that will do some simple network performance/stress testing.

View 3 Replies View Related

General :: Compile And Link A Program To Test Parapin - Undefined Reference

Dec 17, 2010

I'm trying to compile and link a program to test parapin.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "parapin.h"
int main(int argc, char *argv[])
{ ...
[Code]....

It looks like the library is found (no error anyway) but the functions in it are not seen. Text at the beginning of libparapin.a includes function names as used in the test program, and parapin.h declares them.

View 2 Replies View Related

Fedora Installation :: 12 Test Drive Running Live From CD?

Mar 4, 2010

The disk I obtained from a seller runs fine in live mode (no installation) on my Windows XP. I liked what I saw. However, when trying to run cd live on my Linux PC it won't run. Linux pc currently has Kubundu 9.1 installed. Previous to that I had Mint 8 installed, but again Fedora 12 cd would not run. After getting an initial Fedora startup screen, I next receive a bunch of text, ending with a text screen of about 30 lines with "OK" in green to right of each line. At bottom is blinking cursor. That ends my machine's live running of cd.

Obviously, if I can not get cd to run live on linux pc, I'm not going to be able to install. (I should add that ubuntu, kubuntu, mint 8 and pclinuxos all ran successfully live on machine and three of them were installed successfully.) Perhaps, Fedora is at war with Ubuntu et al.

View 1 Replies View Related

Server :: Running Selenium Test Scripts Headless?

Nov 24, 2010

I need to run "Selenium" test scripts (written inside TestNG) on a headless linux server (Red Hat Enterprise Linux Server release 5.3) using Xvfb. while executing the script, I get the following warnings in the "server.log" file.Warning: Cannot allocate colormap entry for "#c0c0c0"Warning: Cannot allocate colormap entry for default background.This warnings occurs when the script try to launch Firefox. Firefox is not getting launched and the code gets hanged in the middle, without executing any test case.I suspect the problem could be with the Xvfb's screen resolution. screen resolution might be lesser than firefox'sexpected resolution.we can be able to specify our own display in POM file using <display> tag.

View 2 Replies View Related

Fedora :: Can't Install Libuuid-devel / When Running The Transaction Test?

Jan 13, 2010

I have tried to install this package with yum and also directly - download the rpm, then rpm -Uvh ....

Both yum and rpm hang - yum when running the transaction test.

Any ideas about this package.

This is running F12, uname -r => 2.6.31.9-174.fc12.i686

View 1 Replies View Related

Ubuntu Servers :: Linux Freezes When Running A JVM Performance Test?

Jun 6, 2010

I am in the process of running a set of performance tests for the latest Sun JVM 1.6.0_20. I am using for that the dacapo test suite: [URL]

I ran the test suite very often with all sorts of settings, but recently it happened once that my Ubuntu system froze. I could still ping the machine, but nothing else was responding any more, no screen output, no ssh login, not possible to switch consoles. After rebooting the system the system logs were quiet. No single trace of any problem.

I am using a custom compiled kernel 2.6.34: Linux i7 2.6.34-custom-201005231602 #1 SMP PREEMPT Sun May 23 16:06:01 CEST 2010 x86_64 GNU/Linux and I am experimenting around with the -XX:+UseLargePages JVM switch the requires to set-up the hugetlbfs on the Linux system: [URL]

A similar issue happened in March 2010 on one of our CentOS 5.4 systems where we run a heavy load Java application on, where we had to hard power off the machine and after the reboot there was no trace of the problem in the logs. On that server we used JDK 1.6.0_17 and did not use hugetlbfs.

My first question would be what to do so that next time something like that happens I have more information available after the incident to debug and analyse the problem?

View 3 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Ubuntu Networking :: Install On Samsung N250 Netbook / Test Works By Running From USB Stick First (without Removing Windows 7)?

Jun 28, 2011

am currently using Windows 7 across my networked PCs at home.

I've just received my new Samsung N250 Plus Netbook which comes with Windows 7 Starter (yuk). I read a post on Ebuyer from someone who has installed ubuntu on his N250 so thought I'd give it a go tonight.

My main concern is whether my wi-fi card (Broadcom 802.11n according to windows) will work when I remove windows and install ubuntu. I intend to use the netbook for internet use only while working abroad.

Is it possible to test it works by running ubuntu from my USB stick first (without removing windows 7)?

View 6 Replies View Related

Programming :: Test If File Is In Use?

May 4, 2010

I want to copy files from an incoming directory, but don't want to copy a file if it hasn't finished being written. I thought of using fuser, but it doesn't seem to be very reliable. I vi'd a file in one window and then ran fuser against the file name and got nothing back. I'm just writing a simple bourne script on RHEL.

View 5 Replies View Related

Programming :: How To Get Grep Output 0 - 1 And Test It

Apr 7, 2009

I am trying to use a shell script to find a string in a file and do something when found. code...

What should happen is pppd will start in a different process and stream it's output to pppdout. pppdout should be created in the current folder. Then the script should periodically check the pppdout file for the string Script (which eventually will appear, some seconds later) and when found exit the script. Ultimately the script will do something useful when the text is found. However, the output from the program is a repeating: 'scriptname.sh: 12: FOUND: not found'

Where scriptname.sh would be the name of your script and 12 refers to the line with 'done'.

Why does grep not find the text, or at least why deos my script not check the grep output correctly?

View 10 Replies View Related







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