473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Issue in Solaris(Service starting and touching a file)

Dheeraj Joshi
1,123 Expert 1GB
Since UNIX forum is for Linux,Unix,BSD and my issue is regarding Solaris i am posting it in lounge.....

In Linux during a service start via init.d a file under /var/lock/subsys/(servicename) is touched....

In Solaris there is no folder named /var/lock/ So does this mean, we need not to touch any file while starting the service via init.d.? Or the file need to be touched is in some other place....

Regards
Dheeraj Joshi
Feb 25 '10 #1
17 3147
NeoPa
32,556 Expert Mod 16PB
And since we don't allow technical questions in the Lounge I'm moving it to Miscellaneous (though I can move it to Unix if you prefer) :D

Sorry Dheeraj, I couldn't resist that.

Seriously though, not the Lounge. This is supposed to be a member chill-out area. Away from technical questions.
Feb 25 '10 #2
Dheeraj Joshi
1,123 Expert 1GB
Sorry...... I did not noticed this misc section is back.....

Regards
Dheeraj Joshi
Feb 26 '10 #3
NeoPa
32,556 Expert Mod 16PB
No worries Dheeraj.

Looking again though, it seems to me that Solaris is actually a version of Unix. It's just Sun's particular flavour. I'll move it in there and we'll see what help you get then.
Feb 26 '10 #4
sicarie
4,677 Expert Mod 4TB
What version of solaris?

There are different implementations of this, depending on what applications and what versions you're using. Is it a specific application, or just any old system app?
Feb 26 '10 #5
numberwhun
3,509 Expert Mod 2GB
@dheerajjoshim Why don't you just give us the output of:

Expand|Select|Wrap|Line Numbers
  1. uname -a
  2.  
from the command line, that will give us what we need to know so that we may help you.

And NeoPa is absolutely correct. Solaris IS one of the flavors of Unix. So that you are aware, here is a list of the different flavors of Unix.


Regards,

Jeff
Feb 27 '10 #6
NeoPa
32,556 Expert Mod 16PB
Well Dheeraj, it seems like you're in the best of hands now :)
Feb 27 '10 #7
Dheeraj Joshi
1,123 Expert 1GB
Yeah.... Solaris version is 5.10... And yes it is a specific application....

Regards
Dheeraj Joshi
Mar 1 '10 #8
NeoPa
32,556 Expert Mod 16PB
Don't forget to run uname -a and post the results here Dheeraj ;)
Mar 1 '10 #9
Dheeraj Joshi
1,123 Expert 1GB
rune ..?

Expand|Select|Wrap|Line Numbers
  1. uname -a
Gave me this.....

SunOS solaris19 5.10 Generic sun4u sparc SUNW,Sun-Fire-V210

Regards
Dheeraj Joshi
Mar 1 '10 #10
NeoPa
32,556 Expert Mod 16PB
Rune? I never said that!!

:D It was a typo I'm afraid.
Mar 1 '10 #11
sicarie
4,677 Expert Mod 4TB
It looks like Solaris 5 was where they started to use svcs, but hadn't really gotten everyone to completely switch over yet.

You said this was a specific app - is it one you are attempting to develop, or maintain? If it's one you're developing, I found the following:

http://man-wiki.net/index.php/2:fcntl#Advisory_locking

That's the recommended method for locking files in Solaris. (found by Google searching 'Solaris 5 lock file?' if you were curious)

If this is an app you have purchased, have you asked the vendor (or online support team) where they implemented their lock file?
Mar 1 '10 #12
Dheeraj Joshi
1,123 Expert 1GB
This App was developed by somebody else, but we have to maintain it and develop new things on top of it....

Regards
Dheeraj Joshi
Mar 2 '10 #13
sicarie
4,677 Expert Mod 4TB
Did you take a look at that link? Do you know what type of file lock that application is using? What language is it written in?
Mar 2 '10 #14
Dheeraj Joshi
1,123 Expert 1GB
It is written in C.... Yes, i have looked into it...

Regards
Dheeraj Joshi
Mar 2 '10 #15
sicarie
4,677 Expert Mod 4TB
You should be able to cat <filename> | grep -i lock and see if there is a line that uses one of the lock functions, if not I'd suggest | grep -i lck and seeing what comes up.

Does that help?
Mar 2 '10 #16
Lockfiles are a *nix trope that have no enforced usage pattern. Many systems provide a standard location in the filesystem, such as the /var/run tree, for lockfiles to simplify permissions management. However, the location of a lockfile is irrelevant.

In the case of init.d scripts, the lockfile is usually used by the script to determine whether the service is running already. Starting a service checks for the lockfile and fails if it exists (because it assumes the service is already running). Stopping a service with the script also removes the lockfile.

You can put the lockfile anywhere you like.
Mar 2 '10 #17
sicarie
4,677 Expert Mod 4TB
Oh wow, I totally missed he was looking for where to put it. Thanks for the catch, sehrgut!
Mar 3 '10 #18

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Kamus of Kadizhar | last post by:
Thanks to Robert Brewer, I got enough insight into logging to make it work.... Now I have another issue: file locking. Sorry if this is a very basic question, but I can't find a handy reference...
3
by: Mats Mohlin | last post by:
We are testing Db2 Cube Views on DB2 V8 for Solaris Small MQT get created OK but for a big MQT we get this message in the db2diag.log ADM6017E The table space "TEMPSPACE1" (ID "1") is full....
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
4
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a...
13
by: dancer | last post by:
I have made a new post because when I try to respond to another, I get the error, "Article Rejected -- Ill-formed message id" This is in response to the advice of Juan Libre to install Net...
5
by: eliasen | last post by:
Hi I have created a Windows Service using C# and .NET2.0. The service is quite simple - right now it doesn't do anything except throwing an exception in the OnStart method. It used to something...
9
by: Hakan Fatih YILDIRIM | last post by:
Hi all, Ý am working aboot WCF. and i have some problems. I created 2 interfaces containing attribute at the top of them.and i want to create two classes implementing these interfaces.One class...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.