Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 823
    • Issues 823
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #2291
Closed
Open
Created Dec 15, 2010 by Damian Johnson@atagar

GETINFO Expansion

Hi. I've made the changes for some of the low hanging fruit for proposal 173 (getinfo-option-expansion). These are platform specific changes and mostly just concern the handling on *nix platforms (tested under 32bit Ubuntu 9.10). The one exception is the pid, where I'm fetching it via the same method as what we do for the PidFile.

Implemented: "process/pid" -- Process id belonging to the main tor process. "process/uid" -- User id running the tor process, -1 if unknown. "process/user" -- Username under which the tor process is running, providing an empty string if none exists. "process/descriptor-limit" -- File descriptor limit, -1 if unknown.

A few others from the proposal would be nice, but look more involved. If these are trivial then please give me a hint and I'll include them too: "relay/read-total" -- Total bytes relayed (download). "relay/write-total" -- Total bytes relayed (upload). "process/descriptors-used" -- Count of file descriptors used. "ns/authority" -- Router status info (v2 directory style) for all recognized directory authorities, joined by newlines.

Most of the other can be inferred from controllers so I'm not as interested in them. Providing the pid via the control port will also resolve: https://trac.torproject.org/projects/tor/ticket/1388

Cheers! -Damian

PS. I'm using the PidFile as my example for cross-platform support, which might be unwise (it just splits between Windows/Non-Windows use cases). I'm not spotting anything that looks like an "#ifdef UNIX" in the tor code - is this the proper approach for cross-platform functionality?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking