Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

alarm(2) [v7 man page]

ALARM(2)							System Calls Manual							  ALARM(2)

NAME
alarm - schedule signal after specified time SYNOPSIS
alarm(seconds) unsigned seconds; DESCRIPTION
Alarm causes signal SIGALRM, see signal(2), to be sent to the invoking process in a number of seconds given by the argument. Unless caught or ignored, the signal terminates the process. Alarm requests are not stacked; successive calls reset the alarm clock. If the argument is 0, any alarm request is cancelled. Because the clock has a 1-second resolution, the signal may occur up to one second early; because of scheduling delays, resumption of execution of when the signal is caught may be delayed an arbitrary amount. The longest specifiable delay time is 65535 seconds. The return value is the amount of time previously remaining in the alarm clock. SEE ALSO
pause(2), signal(2), sleep(3) ASSEMBLER
(alarm = 27.) (seconds in r0) sys alarm (previous amount in r0) ALARM(2)

Check Out this Related Man Page

alarm(3)						     Library Functions Manual							  alarm(3)

Name
       alarm - schedule signal after specified time

Syntax
       #include <unistd.h>

       unsigned alarm(seconds)
       unsigned seconds;

Description
       The  subroutine	causes signal SIGALRM, see to be sent to the invoking process in a number of seconds given by the argument.  Unless caught
       or ignored, the signal terminates the process.

       The requests are not stacked.  Successive calls reset the alarm clock.  If the argument is 0, any request is canceled.  Because of schedul-
       ing delays, resumption of execution of when the signal is caught may be delayed an arbitrary amount.  The longest specifiable delay time is
       100000000 seconds. Values larger than 100000000 will be silently rounded down to 100000000.

       The return value is the amount of time previously remaining in the alarm clock.

Environment
       When your program is compiled using the System V environment, rounds up any positive fraction of a second to the next second.

       When your program is compiled using the POSIX environment, takes a parameter of type unsigned, and returns a value of type unsigned.

See Also
       getitimer(2), sigpause(2), sigvec(2), signal(3), sleep(3)

																	  alarm(3)
Man Page

15 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

I need a free firewall besides zone alarm for XP PRO

Please help. Reply and tell me if you find one. Lots of thanks! Computek (6 Replies)
Discussion started by: computek
6 Replies

2. UNIX for Dummies Questions & Answers

Alarm signal

Hi, when I execute a script on unix AIX, I've got an error message: "Execution: 85328 Signal d'alarme". If I edit this file with "vi", I ve got the same error after a while (about 1 minute). If I try with another user I still have the problem. But if I rename this file, no problem. My... (5 Replies)
Discussion started by: cgsteph
5 Replies

3. UNIX for Dummies Questions & Answers

Autosys Email Alarms

Hello, I'm kind of new to autosys, but I'm assuming there is a way to have Alarms be emailed instead of having to run jobscape and click the Alarm button to see what jobs have failed? Does anyone have an insight onto how this can be done? Thanks. (14 Replies)
Discussion started by: rpiller
14 Replies

4. Programming

Basic signal and alarm usage

I am trying to write a program that will; 1) Show the message "Snoozing now...zzzz" on the screen for 5 seconds 2) Then in the same position show the message "The ALARM is going off now!" for 5 seconds 3) Repeat 1) then 2) infinitely until user presses Ctrl C I can't make it work. Any hints... (17 Replies)
Discussion started by: enuenu
17 Replies

5. Shell Programming and Scripting

File Accessed Alarm ??

Hey, I want to ask a simple Question.... How would I be able to come to know that files/directoires in a Parent directory has been accessed (means contents of the file has been just viewed) by the user(s) in a group ? and mail the name(s) of those files/directories which has been accessed... (16 Replies)
Discussion started by: varungupta
16 Replies

6. Shell Programming and Scripting

Script to raise the alarm in the log File

Hi All, Please help to write the script that should raise an alarm if the new logs will not come in the log file. In other words i want to write a script which will monitor the log file continuously and will raise an alarm if the logs will not come after some time suppose 5... (5 Replies)
Discussion started by: akhtar.bhat
5 Replies

7. Solaris

False Memory usage alarm!!

Hi Experts, I am using Solaris-10, Sun-Fire-V445. i got often the below message- "Memory Usage – Critical, Memory usage (RAM) exceeding 90% The memory utilization is exceeding 90%" in a application running on solaris. I checked with Vmstat. Everything seems to be fine. Where i should... (5 Replies)
Discussion started by: thepurple
5 Replies

8. Shell Programming and Scripting

help with alarming script

hi, im trying to setup a script which can look at a file and email me when a fail is present, this runs on cron every 10 minutes Below is the file that will tell me if a PASS or FAIL has occured $more monitor/results Test: 01db_up.sh. Status: PASS. Message: db is up Test: 02cm_up.sh.... (5 Replies)
Discussion started by: jeffersno1
5 Replies

9. Shell Programming and Scripting

Is this the "right" way to make an alarmclock?

I'm pretty unsophisticated in my scripting. I never followed a method to learn, I just use google when I want to figure out how to use a command or preform a certain function (and most of the results are from here or the ABSG). Anyway, there are a lot of gaps in my knowledge. So, I wanted... (13 Replies)
Discussion started by: ninjaaron
13 Replies

10. UNIX and Linux Applications

No alarm triggered when backup tape is full

Hi folks, i encountered an issue, no alarm is triggered when the tape is full on the Solaris server. The tape is 72GB. There is an alarm generating shell script in the server, which will trigger an alarm when it detects the tape is full. Hence, I will receive SMS and email alerts. This has been... (10 Replies)
Discussion started by: kimurayuki
10 Replies

11. UNIX for Advanced & Expert Users

Kill a process after a certain amount of time

I would like to kill a process after a certain amount of time. Can I please get some ideas on how to do this? (9 Replies)
Discussion started by: cokedude
9 Replies

12. Shell Programming and Scripting

crontab+mplayer alarm clock

I'm trying to run a alarm.sh using crontab, which play a song as an alarm at 6.15 am. I'm using amixer so that volume increases by 10% in every loop. My script is the following. SHELL=/bin/bash PLAYER=/usr/bin/mplayer SONG=/home/hbar/Music/song.mp3 DISPLAY=:0.0 15 06 * * *... (10 Replies)
Discussion started by: hbar
10 Replies

13. Shell Programming and Scripting

Need help in restarting process

Hi friends, I have one unix command which is used to check the network status manually. followig is the command check_Network this command give follwoing status Network 1 is ok Network 2 is ok network 3 is ok network 4 is ok . . . . Network 10 is... (8 Replies)
Discussion started by: Nakul_sh
8 Replies

14. Solaris

Ftpd alarms

Hi, I am facing following alarms in var/adm/messages after an interval of 10 mins. I dont know what the impact is and how can i fix it. Can anyone help please? Dec 4 07:50:03 hxcsvc-a01 ftpd: open_module: stat(/usr/lib/security/pam_unix_session.so.1) failed: No such file or directory Dec ... (4 Replies)
Discussion started by: sni_engineer
4 Replies

15. UNIX for Beginners Questions & Answers

CentOs server generating several alarms on partition /proc/

Greetings, I have been facing one issue here and I am not understanding what is causing. I am getting a lot of alarms complaining that the partition for example /proc/12345 , is full, but the partition does not existe on the server. Which is not supposed to happen, because /proc is not a real... (10 Replies)
Discussion started by: Yagami_Sama
10 Replies