How can i tell which conf file it is using


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How can i tell which conf file it is using
# 1  
Old 01-08-2010
How can i tell which conf file it is using

i have this program running on my solaris and there are two identical config files, i am not sure which one is being used by this program but I am sure it uses one of them.

I run lsof -p {pid} but it does not show which config file has been read by this program, what i am doing wrong?

thanks
# 2  
Old 01-08-2010
lsof won't show the config file unless it actually has it open. The daemon probably opens it once, reads it, and closes it again. Check the init scripts for the daemon, they may specify which config file it uses.
# 3  
Old 01-08-2010
Perhaps you can try renaming or moving each temporarily, and running the program, to see if it might create a new one, or errors out. Do programs generally create conf files if they are missing? I know it can happen in Mac OS X.
# 4  
Old 01-08-2010
Try

# truss -aefp -rall -wall {PID of running application}

Then somehow tell your application to re-read it's config file? At least then you can look through the truss output to see the system calls. Might be able to do without the "-wall" (list all writes in full)

You could also use truss to wrap the application, and parse the output:

# truss -af /path/to/executable

Hope this helps
# 5  
Old 01-08-2010
Doing an ls -lu of each conf file will show when they was last acessed, assuming no backups or virus sweeps are running then one conf file will have a recent date and time and the other an older one.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies

2. Shell Programming and Scripting

Script to update rsyslog.conf and auditd.conf

Hello all, Newbie here. I'm currently tasked with updating rsyslog.conf and auditd.conf on a large set of servers. I know the exact logging configurations that I want to enable. I have updated both files on on a server and hope to use the updated files as a template for the rest of the... (3 Replies)
Discussion started by: Mide
3 Replies

3. Shell Programming and Scripting

Help with awk and conf file

hello i have a configuration file with some fields, for example: #file conf.cfg name;object;var1;var2;var8 then i have a csv data file: var1;var2;var3;var4;var5;var6;var7;var8;var9 aaa;bbb;ccc;ddd;eee;fff;ggg;hhh;iii ... now i should read the conf.cfg file and extract the... (3 Replies)
Discussion started by: drain
3 Replies

4. Shell Programming and Scripting

Conf file entry.

Hi, Lets say I have a script which reads a conf file (say MASTERFILE) line by line to fetch file_name, source_path, dest_path. But currently, here the file name are static for eg: ABC.txt or XYZ.txt. So i have hard-coded in the conf file. So what happens that the script picks up the file_name... (1 Reply)
Discussion started by: amit.mathur08
1 Replies

5. UNIX for Advanced & Expert Users

Help me at squid.conf file

Hi all, i have a scenario below: <========> <=========> Internet With IP: -Local: 10.0.0.2 -Squid: 2NICs (10.0.0.1 and 192.168.100.1) -Internet: 192.168.100.2 * On Squid: hosting a website name www.sample.com * On Local: hosting a website name www.abc.sample.com * Complete DNS... (0 Replies)
Discussion started by: kidzer0
0 Replies

6. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

7. AIX

/etc/syslog.conf file and warnings

Hi All, I am working on a server which has an /etc/syslog.conf file with the following entries (example): local6.debug /dplogs/uss1udp001.log rotate size 1500m time 1d files 14 local7.debug /dplogs/uss1udp002.log rotate size 1500m time 1d files 14 -----------------------------... (3 Replies)
Discussion started by: jeffpas
3 Replies

8. UNIX for Advanced & Expert Users

Configuring snmpd.conf and snmptrapd.conf

HI, I want a help for Configuring snmpd.conf and snmptrapd.conf (i.e Configuring SNMP) for receiving TRAPS in my networks. I am using RHEL4.0 OS. Please tell me How I can configure above two files in a proper way and at an advanced level. Especially I am getting... (2 Replies)
Discussion started by: jagdish.machhi@
2 Replies

9. IP Networking

snmptrap.conf file

Hi I tried a lot bt could not configure snmptrapd.conf... Can any one tell me the steps or give me the configured snmptrapd.conf file?? Its really important..Plz help me.. Thanx (0 Replies)
Discussion started by: swapna_me
0 Replies

10. UNIX for Dummies Questions & Answers

swat's smb.conf file?

i am running samba 3 on solaris 9 i have a question where is the smb.conf located is it in /usr/local/samba/lib or private (6 Replies)
Discussion started by: rmuhammad
6 Replies
Login or Register to Ask a Question