The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Disadvantage of background processes unni.raj UNIX for Dummies Questions & Answers 3 08-04-2009 12:35 PM
Keep a certain number of background processes running dgob123 Shell Programming and Scripting 7 03-24-2009 09:35 AM
Question about background processes neimaD Linux 10 09-10-2008 11:21 AM
Running two processes in background jacob_gs Shell Programming and Scripting 6 05-13-2002 12:40 PM
Background processes korndog UNIX for Advanced & Expert Users 2 09-20-2001 10:56 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-23-2009
JVerstry JVerstry is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
About running processes in background

Hi,

I need to establish a procedure that will start an application in background each time my remote Solaris server is (re)started. This would be a kind of daemon. I am no sysadmin expert, so I am looking for pointers.

How should I proceed? What are the main steps?

Thanks,

JVerstry
  #2 (permalink)  
Old 08-23-2009
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,991
you should probably read about "init scripts" (if you are < solaris 10) or about "SMF" (solaris 10 or newer). a good startpoint is:

Sun Microsystems Documentation
and
Sun Microsystems - BigAdmin System Administration Portal
  #3 (permalink)  
Old 08-23-2009
JVerstry JVerstry is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
Thanks.

The 'uname -r' command tells me that my Solaris version is 5.11.

I have been doing some reading and it seems like I would have to put my script in the /etc/init.d/ directory or in a /etc/rc?.d directory (? = run level).

Is this correct? If yes, in which directory should I put my script (and with which run level)?

I have also read about a svcadm command available on Solaris 10 to enable services, but it does not exist in 5.11. Is there anything I should do to 'activate' my service/script in 5.11? Or does copying the script in the proper directory enough?

Thanks,

JVerstry
  #4 (permalink)  
Old 08-23-2009
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlosuǝdo
  
 

Join Date: Dec 2007
Location: Paris
Posts: 1,460
svcadm definitely exists with SunOS 5.11.

rc.d scripts are also still supported as an alternative.

If you are unsure about where to put your script, use run level 3 with a late run, eg:
/etc/rc3.d/S99myLocalService

Don"t forget to set stop scripts too:

/etc/rc0.d/K00myLocalService , /etc/rc2.d/K00myLocalService and /etc/rc3.d/K00myLocalService.
  #5 (permalink)  
Old 08-23-2009
JVerstry JVerstry is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
When I run svcadm, the command is not found. May be it has not been installed.

Just to make sure I understand you correctly:

i) /etc/rc3.d/S99myLocalService -> S99 means start late? In other words, Solaris would start this process after S98xxx files for example?

ii) You mention the creation of stop scripts. Do I have to create 3 scripts or is one in rc3.d enough?

iii) The stop script should contain a command stopping my service correct?

iv) If I use the /etc/rc?.d do I still need to activate my service with svcadm?

Thanks,

JVerstry
  #6 (permalink)  
Old 08-23-2009
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,991
5.11 (opensolaris) is newer than solaris 10, so there should be the tools (make sure you are "root") for manage services. these are:

svcs, svcadm, svccfg, svcprop, ...

if you try to use a legacy script, you have to know where to put it, depending on the runlevel and the dependencies...

Last edited by DukeNuke2; 08-23-2009 at 02:01 PM.. Reason: wrong command (svccfg)
  #7 (permalink)  
Old 08-23-2009
JVerstry JVerstry is offline
Registered User
  
 

Join Date: Aug 2009
Posts: 16
5.11 is newer than 10, I would never have guessed, lol !!!

svcs and svcprop do work, but svcadm and svcconf not (i.e., command not found). I have sent an email to the system administrator to get more info.

Thanks,

JVerstry
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:52 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0