Tagged Questions
0
votes
1answer
38 views
Review of a crontab script to add timestamps to minutely runs; any suggestions?
I've got a crontab job set to run minutely as such:
* * * * * /home/username/public_html/domain.tld/production/scripts/cron_runner.sh
My goal is to add some timestamps to output from cron so I can ...
1
vote
1answer
35 views
Linux date translation to different time zone
The Linux server is hosted in EST timezone. But I want to translate the output of date command to IST(Indian Standard time +5:30 hrs) format and use it in a shell script. Is there any option available ...
1
vote
1answer
54 views
Use shell built-in time while checking exit status of a function and suppressing output
I am attempting to do the following in a bash script and am wondering if it is possible:
Time the output of a command (in this case, mysql) using time
Suppress the stdout output of the command
...
2
votes
1answer
78 views
Unix Command to timestamp the output of a file, but with the relative-to-when-it-started time?
There are numerous programmes (e.g. ts in moreutils), and various bash one-liners to prepend the output of a command/pipe with the timestamp of when that line was 'printed'.
However is there a ...
1
vote
1answer
231 views
Measure query execution time in bash
I need to measure a query total execution time from inside a bash script.
Somebody told me to submit something like:
mysql --user="someuser" --password="pw" -D "dbname" -e 'your-sql-command;'
Is ...
2
votes
1answer
191 views
Why does the time it takes to run this script differ so much between user and system and how I might correct the discrepancy?
My application sits behind a load balancer, and every once in a while I like to do a status check on each machine to get an idea of the time it takes to return an index.html document on each machine.
...
1
vote
2answers
453 views
unix timestamp wrong time with rrdtools
I have problem with unix timestamp ( date +%s ). This command gives me a GMT time, however I am using CET, so the unix timestamp is in 1 hour late (and my rrdtool database too!). How I can change unix ...
40
votes
7answers
49k views
How do I get current Unix time in milliseconds using bash?
How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
0
votes
4answers
347 views
bash: convert iso dates to d:m:y
I have a program, which produces output like this (iso format dates):
2010-06-04 15:48:17 +0200
2010-06-04 12:34:39 +0200
2010-02-01 14:02:44 +0200
2010-06-04 12:21:19 +0200
2010-06-04 12:21:04 +0200
...