Hello all ,
i need some help asap
i have a program that keeps killing the machine
when i did google searches and 2 days later i ran strace
it seems the programm keeps making a system call to gettimeofday
to i guess increment a counter ?
is there a way i can put a wrapper around it so any calls to gettimeofday are not handled ?
thanx all
Last edited by jim mcnamara; 09-18-2012 at 03:02 PM..
Program wrapper for handle system call gettimeofday
hi all
i posted in another thread but this is what i found since
i am trying to handle a gettimeofday call by a program thats killing cpu on my machine
i searched and found this
can any of you gurus help me ? if we can use this as a base
i need to
a) handle gettimeofday with it
b) compile it under gcc in ubuntu ( tried compiling this as is , lots of error )
thank you all
Moderator's Comments:
Please use code tags
Last edited by jim mcnamara; 09-18-2012 at 03:04 PM..
I think you should look at time spent in calls. gettimeofday is one of the least expensive system calls there is.
Steps to do what you asked
1. create your own shared library, call it mylib.so
You do this by writing a do-nthing call:
compile it as a shared library.
2. change your environment variables:
add
When you run the application it will load YOUR version of gettimeofday.
1. it may not work in secure environments like selinux because you are hijacking a syscall.
2. it will not work with setuid or setgid executables
What does the application, that you are trying to fix, do for you? If it is some opensource free download version 0.04 it is probably nothing but headaches for everyone. Especially you.
Hi ,
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
Hi Gurus,
I need to build a wrapper script which will be passing the loading date and the data file name (provides option to the user to load a single data file or load all the data files) to the actual loader data_load.ksh to load in the database.
1. I want to execute the loader script... (6 Replies)
The following bash script does not work because the java/groovy code always thinks there are four arguments even if there are only 1 or 2. As you can see from my hideous backslashes, I am using cygwin bash on windows.
export... (1 Reply)
Hi,
I have a small grepping problem in my script.I am having a file from which i need to make sure "#^A17" is the last updation (Next # can be ignored) before ################.The idea behind this is, if this file contains "A17" as the last updation, i need to do a particular activity. please... (7 Replies)
Hello Friends,
I am a Graduate in Computers. I completed BCA degree this year. I want to make my career in UNIX. But, unfortunately I don't know anybody who can guide me. I am totally confuse because I don't know where to start and what are the future prospect in UNIX.
Please give your... (4 Replies)
--------------------------------------------------------------------------------
hy guys,
i got few interview questions i need someone to answer urgently:
1)If you cant get to the root, you try to fsck it, but gets errors to read file systems. What steps do you take to recover the host... (1 Reply)
Hi
To delete some text in 2 files in line1 ( not complete line) in unix without opening the files.
For example: source file is like this
<?xml version="1.0"... (5 Replies)
hi i want solution regarding usage of array. i m having code which is written using if-
elif and can i use or access using arrays.
here i wana use array values along with if -elif condition. i dnt wana use command line argument
parameter1=(scram no_scram)
if ; then
... (0 Replies)
hi guys i am new to UNIX and i am very much excited to learn how it works.. i was very confused with how to start and what book to follow so i went to my lecturer and asked him if he could suggest something. he advised me to get this book
Your UNIX: The Ultimate Guide by "Sumitabha Das"
ISBN:... (4 Replies)
i have a script, which is continuously looping. i want to view the script name when i use ps command... it is only showing -sh ...
UID PID PPID C STIME TTY TIME COMMAND
informix 8533 20923 0 18:19:28 pts/ta 0:00 -sh
but i dont have my scriptname displayed .... how can i do that my script is... (0 Replies)