Sponsored Content
Top Forums Programming How to halt Prog Execution for some time? Post 40013 by Ahsan on Sunday 7th of September 2003 03:01:25 AM
Old 09-07-2003
Question How to halt Prog Execution for some time?

Hi,
Perhaps I am asking a silly question, but I really don't know about it. Can anyone tell me the function for "sleep" kind of functionality in C language for Unix. I don't think any function with the name of sleep() exits in Unix's C language. or perhaps I am not known with the header file required for this. Can anyone guide me about the correct function to halt the program execution for a specified time? Do tell me the header file required for the function as well.

Regards,
 

10 More Discussions You Might Find Interesting

1. Programming

execution time

hi , i ve coded a C program in that im using malloc dynamically , it is being called many times in the program The program is to simulate jobs in manufacturing system. the execution time is increasing drastically as the number of jobs are increased. could any body tel what may be the problem... (2 Replies)
Discussion started by: ramki_rk
2 Replies

2. UNIX for Dummies Questions & Answers

last execution time

is there a command in Solaris 8 that will show a particular scripts last execution time? (1 Reply)
Discussion started by: cubs0729
1 Replies

3. UNIX for Advanced & Expert Users

specifying an execution time

Hi all, do ny o u'll know how to set a particular execution time for a program??? for eg.: --> during the execution of a file, i call a certain other function. --> while calling this function, my comp hangs. now is there ny way in which i can go to the nxt line of code by aborting the call... (7 Replies)
Discussion started by: VGR
7 Replies

4. Shell Programming and Scripting

Estimated execution time

Hi All, One of my script runs (approximately) for 20 to 40 hours Is there any way in unix to find the estimated time required for a shell script(Cron job).ie to find the time required for execution even before the script is executed. Any discussion(pointers) regarding the same is most welcome. (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

5. Shell Programming and Scripting

To reduce execution time

Hi All, The below script I run daily and it consumes 2 hours approx. In this I am calling another script and executing the same twice. Is the loop below the cause for the slow process?Is it possible to finetune the program so that it runs in a much faster way? The first script: #!/bin/ksh... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies

6. Shell Programming and Scripting

command execution time

Hi all, I want to display a progressbar depending upon the completion status of a command. I am coding from scratch as I dont want to use in place code. so Is there anyway of getting the progress of a command in percentage or in any other units while its running , is it possible using the top... (5 Replies)
Discussion started by: hashin_p
5 Replies

7. Shell Programming and Scripting

time of execution of script

i want to test whether a script has been executed in last 15 days or not....please help how can i do this...is there any copmmand there to know timings of last execution of any script (8 Replies)
Discussion started by: arghya_owen
8 Replies

8. UNIX for Dummies Questions & Answers

time taken for execution

how much time a particular command or shell script executed there is any command to know this thanks (5 Replies)
Discussion started by: tsurendra
5 Replies

9. Shell Programming and Scripting

To take script execution time

Hello Guys, I would like to know is there a way to take the script execution time For e.g i am having a script.sh i need to write inside he script.sh like Start time : 10-Mar-2016 02:30:35 all code over here ... End time : 10-Mar-2016 03:30:32 Script start time - 02:30:35 ... (7 Replies)
Discussion started by: Master_Mind
7 Replies

10. Shell Programming and Scripting

Need to reduce the execution time

We are trying to execute below script for finding out the occurrence of a particular word in a log file Need suggestions to optimize the script. Test.log size - Approx to 500 to 600 MB $wc -l Test.log 16609852 Test.log po_numbers - 11 to 12k po's to search $more po_numbers xxx1335... (10 Replies)
Discussion started by: KumarPiyush7225
10 Replies
halt(8) 						      System Manager's Manual							   halt(8)

NAME
halt - Stops the processor SYNOPSIS
/usr/sbin/halt [-d] [-l] [-n] [-q] [-y] DESCRIPTION
If other users are logged into the system, or if the system is operating at a multiuser run level, use the /usr/sbin/shutdown -h command to halt the system. If only the root user is logged in, and you do not plan to restart the system immediately, use the halt command. The halt command writes data to the disks and then stops the processor(s), but does not reboot the machine. You must be the root user to run this command. When the system displays the ....Halt completed.... message, you can turn off power to the machine. If the command is invoked without the -l, -n, or -q flag, the halt program logs the shutdown using the syslogd command and places a record of the shutdown in the login accounting file, /var/adm/wtmp. Using the -q and the -n flags imply the -l flag. FLAGS
Generates a crash dump of the system before halting it. Can be used with any other flag. Does not log the halt using syslog Prevents the sync before stopping, and does not log the halt using syslog Causes a quick halt, does not log the halt using syslog, and makes no attempt to kill all processes Halts the system from a dial-up operation EXAMPLES
To halt the system without logging the shutdown in the log file, enter: halt -l To halt the system quickly, enter: halt -q To halt the sys- tem quickly, also leaving a crash dump for the savecore command, enter: halt -d -q To halt the system from a dial-up, enter: halt -y FILES
Specifies the command path Specifies the syslog daemon Specifies the login accounting file RELATED INFORMATION
Commands: fasthalt(8), reboot(8), savecore(8), shutdown(8), syslogd(8) Functions: reboot(2), sync(2), syslog(3) delim off halt(8)
All times are GMT -4. The time now is 07:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy