Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-01-2023, 04:39 AM
|
#1
|
Member
Registered: Feb 2023
Posts: 630
Rep:
|
Process and configuration files
Hello,
I have run Tor with two configuration files and when I check the processes I see two Tor processes:
Code:
# ps -A
PID TTY TIME CMD
261608 ? 00:00:32 tor
271881 ? 01:07:30 tor
How can I find out which configuration file each of these processes belongs to?
Thank you.
|
|
|
11-01-2023, 04:58 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,316
|
probably lsof -p <pid>, or check /proc/<pid>/
|
|
|
11-01-2023, 05:35 AM
|
#3
|
Member
Registered: Feb 2023
Posts: 630
Original Poster
Rep:
|
Quote:
Originally Posted by pan64
probably lsof -p <pid>, or check /proc/<pid>/
|
Hello,
Thank you so much for your reply.
In the output of the lsof -p <pid> command, I didn't see anything about the configuration file, but from the /var/lib/tor_OpenVPN/lock line in the output, I was able to identify which configuration file this process belongs to, because I had put the DataDirectory /var/lib/tor_OpenVPN line in the Tor configuration file.
As for the proc directory, which file should I check?
Code:
# cat /proc/261608/
arch_status cpuset limits numa_maps schedstat task/
attr/ cwd/ loginuid oom_adj sessionid timens_offsets
autogroup environ map_files/ oom_score setgroups timers
auxv exe maps oom_score_adj smaps timerslack_ns
cgroup fd/ mem pagemap smaps_rollup uid_map
clear_refs fdinfo/ mountinfo patch_state stack wchan
cmdline gid_map mounts personality stat
comm io mountstats projid_map statm
coredump_filter ksm_merging_pages net/ root/ status
cpu_resctrl_groups ksm_stat ns/ sched syscall
|
|
|
11-01-2023, 11:51 AM
|
#4
|
Senior Member
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 1,038
|
If you used the "-f" option to specify the conf file, it will show on the command line under 'cmdline" file of that process.
|
|
|
11-14-2023, 11:32 PM
|
#5
|
Member
Registered: Feb 2023
Posts: 630
Original Poster
Rep:
|
Quote:
Originally Posted by jayjwa
If you used the "-f" option to specify the conf file, it will show on the command line under 'cmdline" file of that process.
|
Hello,
Thank you so much for your reply.
Where should I use -f?
|
|
|
11-15-2023, 11:56 AM
|
#6
|
Senior Member
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 1,038
|
Code:
tor -f /etc/other/torrc
If you run Tor without setting the config file, it will grab /etc/tor/torrc. Seems like both your instances will grab that default value. I'm not sure how you have two running off the same config as they'd try to access/bind the same port. Is there a special reason you are using two instances? You can set multiple hidden services with one file.
|
|
1 members found this post helpful.
|
11-21-2023, 11:31 PM
|
#7
|
Member
Registered: Feb 2023
Posts: 630
Original Poster
Rep:
|
Quote:
Originally Posted by jayjwa
Code:
tor -f /etc/other/torrc
If you run Tor without setting the config file, it will grab /etc/tor/torrc. Seems like both your instances will grab that default value. I'm not sure how you have two running off the same config as they'd try to access/bind the same port. Is there a special reason you are using two instances? You can set multiple hidden services with one file.
|
Hello,
Thank you so much for your reply.
Yes, I have used -f. I want to merge Tor with OpenVPN and have a Tor proxy also.
|
|
|
01-20-2024, 02:35 PM
|
#8
|
Member
Registered: Feb 2023
Posts: 630
Original Poster
Rep:
|
Hello,
The ps aux | grep tor command, gave me some useful information.
Thank you.
|
|
|
All times are GMT -5. The time now is 02:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|