09-22-2008
Changing what time a process thinks it is with libfaketime
09-22-2008 08:00 AM
With libfaketime you can tell a process that the current time is something different from the machine's system clock. This fake time setting affects not only the functions directly related to reading the system time, but also file timestamps such as modification times. With libfaketime you can test how a program will respond when it is running in the future or in a different timezone without having to change your machine's system clock. Timezone testing can be useful for network applications where a certificate may have already expired in a given timezone but might still work in your local environment.
Source...
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
How do I change the owner of the process in runtime.I'm working AIX.
I would appreciate ,If I get sample scripts. (1 Reply)
Discussion started by: kkb_karthi
1 Replies
2. UNIX for Dummies Questions & Answers
how to decrease priority of a particular process in time of process creation...
and also how to decrease priority of a particular process after process creation..
can any one please help me out... (2 Replies)
Discussion started by: Ramkum
2 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I am running the following accounting on one of my executable,
$ accton /home/myexe-acct
$ ./myexe
$ accton
When I check the process timings I get the below result,
Shell process time: 300ms
myexe time: 100ms
I want to know on why the shell(sh) process is taking so much time... (1 Reply)
Discussion started by: santoshbr4
1 Replies
4. Linux
Process start time is not showing the correct time:
I had started a process on Jun 17th at 23:30:00.
Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41
Day/Date is setup correctly on the server.
It... (2 Replies)
Discussion started by: hemangjani
2 Replies
5. UNIX for Dummies Questions & Answers
I can't access the data in one of my directories (Mac OS X 10.6.2 "Snow Leopard", MacBook Pro if that matters). It has set its permissions such that it thinks it is a binary file for some reason.
I am not really sure how this happened, but is there a way to reset the first bit of the... (4 Replies)
Discussion started by: slgstevenson
4 Replies
6. Shell Programming and Scripting
Hello All,
I have a problem calculating the time difference between start and end timings...!
the timings are given by 24hr format..
Start Date : 08/05/10 12:55
End Date : 08/09/10 06:50
above values are in mm/dd/yy hh:mm format.
Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies
7. UNIX for Dummies Questions & Answers
We are running unix. After a reboot of the server we have found that changing password takes a long time. if type in passwd "username" you can type in the 1st instance of the password , press enter , then it will wait for about 3 minutes before bringing up the confirm password line typing it in... (4 Replies)
Discussion started by: AIXlewis
4 Replies
8. Red Hat
I have a RHEL 5.5 system that i see this behavior on:
# uname -a
Linux myhost 2.6.18-194.17.4.0.1.el5 #1 SMP Tue Oct 26 20:10:33 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
#using netcat to listen to a port tells me its in use.
$ nc -l myhostip 33371
nc: Address already in use
$
# trying... (4 Replies)
Discussion started by: skkool22
4 Replies
9. AIX
Hi
We are in the situation where we want to start WebSphere using teh default SSL port of 443. In order to do this we can changed the WAS ssl port from 9443 to 443 and start as root. We would prefer not to start as root but the restriction of using ports < 1024 comes into play. We could install... (3 Replies)
Discussion started by: hukcjv
3 Replies
LEARN ABOUT CENTOS
pmlocaltime
PMLOCALTIME(3) Library Functions Manual PMLOCALTIME(3)
NAME
pmLocaltime - convert the date and time for a reporting timezone
C SYNOPSIS
#include <time.h>
#include <pcp/pmapi.h>
struct tm *pmLocaltime(const time_t *clock, struct tm *result);
cc ... -lpcp
DESCRIPTION
pmLocaltime is very similar to localtime(3), except the timezone used is the current ``reporting timezone'' (rather than the default TZ
environment variable scheme), and the result is returned into a caller-declared buffer (rather than a private buffer).
Like localtime(3) the time to be converted is passed via clock, and the result contains the components broken out in the elements of the tm
struct.
pmLocaltime returns result as the value of the function.
The default current reporting timezone is as defined by the TZ environment variable, so pmLocaltime and localtime(3) will initially produce
a similar encoding of the date and time.
Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a new current reporting timezone that will affect pmLocaltime but not
localtime(3).
SEE ALSO
localtime(3), PMAPI(3), pmCtime(3), pmGetConfig(3), pmNewContextZone(3), pmNewZone(3), pmUseZone(3), pcp.conf(5) and pcp.env(5).
Performance Co-Pilot PCP PMLOCALTIME(3)