मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)23k · #10142

witr

यह क्या करती है

यह चल रहे प्रोसेस, पोर्ट, कंटेनर या खुली फ़ाइल का पता उस सेवा, शेल या शेड्यूल्ड जॉब तक लगाती है जिसने उसे शुरू किया। यह उन लोगों के लिए है जो कोई पोर्ट इस्तेमाल में देखते हैं या कोई ऐसा प्रोसेस जिसे वे पहचानते नहीं।

कब इस्तेमाल करें

  • ✓जब कोई पोर्ट पहले से इस्तेमाल में हो और आपको पता करना हो कि उसे कौन पकड़े है।
  • ✓जब कोई dev सर्वर या दूसरा प्रोग्राम गलती से चालू रह गया लगे।
  • ✓जब कोई अज्ञात प्रोसेस चल रहा हो और आप जानना चाहें कि उसे किसने शुरू किया।

Skill का लिंक

https://github.com/pranshuparmar/witr/blob/main/plugins/witr/skills/witr/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/pranshuparmar/witr/blob/main/plugins/witr/skills/witr/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“पोर्ट 3000 पहले से इस्तेमाल में है। उसे किसने शुरू किया, और क्या आप मुझे बता सकते हैं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह आपके बताए प्रोसेस या पोर्ट की जाँच करती है, उस श्रृंखला को बताती है जिसने उसे शुरू किया और चालू रखा है, और जो कुछ संदिग्ध लगे वह भी। यह सिर्फ़ पढ़ती है और कुछ भी बंद नहीं करती।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

witr: why is this running?

witr traces a process, port, container or open file back to what started it and keeps it running (a systemd unit, launchd job, container, cron job, shell, PM2 or supervisor, a Windows service, ...), and flags anything suspicious. It only reads. It never stops, kills or changes anything.

Reach for it instead of chaining lsof, ps, ss, netstat and docker ps.

Before you start

Check that it's installed with witr --version. If it isn't, tell the user and suggest one of these; don't install anything without asking:

  • macOS or Linux: brew install witr, or curl -fsSL https://raw.githubusercontent.com/pranshuparmar/witr/main/install.sh | bash
  • Windows: winget install -e --id PranshuParmar.witr
  • With Go: go install github.com/pranshuparmar/witr/cmd/witr@latest

Always give a target and --json. Without a target, --json exits with code 4 and asks for one; a bare witr opens an interactive dashboard, or exits with code 4 when there's no terminal.

Pick the command

Situation Command
Port already in use (EADDRINUSE) witr --port 3000 --json
A process by name witr node --json (matches substrings; add --exact for the exact name)
A known PID witr --pid 1234 --json
A container witr --container web --json (name, image, Compose service or ID prefix)
What holds a file or lock witr --file /var/lib/dpkg/lock --json
Just the chain of parents witr --pid 1234 --short (one line) or --tree
Several things at once witr --port 3000 --port 5432 --json (a JSON list, one entry per target, in order)
A process's environment witr --pid 1234 --env --json
More detail add --verbose (memory, I/O, open files, socket state)

Read the result

Check the exit code first:

Exit Meaning What to do
0 Found, no warnings Report it
1 Found, with warnings. Not a failure Report it and mention the warnings that matter
2 Not found Nothing on this system runs or listens there; say so. For a port, Error may say something outside this system (another WSL distro, a VM) holds it
3 Permission denied It belongs to another user; suggest re-running with sudo, and ask first
4 Ambiguous or bad input Matches lists the candidates: re-run with --pid for the right one, or fix the input. Servers with same-named workers (nginx, postgres) list every worker; the one you want is usually the parent
5 Internal error Report the Error
6 Found, but what started it can't be traced (Linux, macOS, FreeBSD) The process that started it has exited; say so

With several targets, the most severe result wins.

Then the JSON (the full contract is in the README, section "7.3 JSON Output"):

  • Found: Process (PID, Command, Cmdline, User, StartedAt, WorkingDir, Sockets, ...), Ancestry (the chain from the top down to the process), Source (Type: systemd, launchd, bsdrc, container, shell, ssh, cron, supervisor, windows_service, init or unknown; Name; Description), Warnings, and Container when it runs in one.
  • Failed lookup: {Target, Error}, plus Matches when the target was ambiguous.
  • --short --json: a list of {PID, Command}. Where the process that started one has exited, that entry also has PPID and ParentExited: true.
  • A container whose processes aren't visible (Docker Desktop, a VM): {ContainerName, Image, Ports, ..., Note}.

Match on fields and exit codes, not on wording: the text of Error, Note, Description and warnings can change between releases.

Explain it to the user

Lead with the answer: what it is, and what started it. For example: "Port 3000 is held by node (pid 4821), started by PM2 from ~/work/api." Mention warnings that matter, such as a public bind, running as root, a deleted binary or a restart loop.

Freeing a port or stopping something

witr only explains. Don't kill or stop anything on your own: tell the user what holds the port and what manages it, and ask before acting.

When they agree, stop it through whatever manages it, or it will come straight back. Use Source.Type, Source.Name and Container:

Managed by Stop with
systemd systemctl stop <unit> (--user for a user unit)
launchd launchctl bootout gui/$(id -u)/<label> (`sudo launchctl bootout system/<label
अक्सर पूछे जाने वाले सवाल

क्या यह प्रोसेस बंद कर देगी?

नहीं। यह सिर्फ़ जानकारी पढ़ती है और कुछ भी बंद या बदलती नहीं।

क्या यह Windows पर काम करती है?

हाँ। इसका Windows इंस्टॉल विकल्प है और यह Windows सर्विस भी समझा सकती है।

क्या मेरे एजेंट में टूल पहले से इंस्टॉल होना चाहिए?

हाँ। यह पहले टूल जाँचती है, और न मिलने पर इंस्टॉल का सुझाव देती है, पर कुछ भी इंस्टॉल करने से पहले पूछती है।

जानकारी

लेखक का मूल विवरण

Explains why a process is running and what started it, using the witr CLI. Use when a port is already in use (EADDRINUSE), a dev server or other process was left running, an unknown or stuck process needs explaining, or you need to know which service, container, shell, supervisor or scheduled job started a process, holds a port or holds a file lock. Use it instead of chaining lsof, ps, ss, netstat and docker ps.

repo: pranshuparmar/witr

लोकप्रियता

GitHub स्टार
23k
रैंकिंग में स्थान
#10142
लाइसेंस
Apache-2.0
अपडेट की गई
23/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

मिलती-जुलती skills