- Witr (why-is-this-running) एक ऐसा टूल है जो Linux सिस्टम में किसी खास process, service, या port के क्यों चलने को स्पष्ट रूप से दिखाता है
- मौजूदा
ps, top, lsof आदि जहाँ सिर्फ “क्या चल रहा है” दिखाते हैं, वहीं यह “क्यों चल रहा है” की causal relationship को एक ही स्क्रीन पर दिखाता है
- PID-आधारित analysis के जरिए process की origin, execution path, बने रहने की वजह, और जुड़े context को ट्रैक करता है
- systemd, docker, pm2, cron, shell जैसे कई sources के साथ जुड़कर चलने की वजह समझाता है, और read-only·non-destructive तरीके से काम करता है
- debugging और incident response के समय समझने में लगने वाला समय कम करता है, और complex सिस्टम की execution structure को एक नज़र में समझने में मदद करता है
उद्देश्य और अवधारणा
- Witr का मुख्य सवाल है, “यह क्यों चल रहा है? (why-is-this-running)”
- process, service, port जैसी सभी running entities की origin और वजह को ट्रेस करता है
- कई layers (supervisor, container, service, shell आदि) में फैली indirect execution causes को स्पष्ट रूप से दिखाता है
- जहाँ मौजूदा tools सिर्फ state और metadata देते हैं, Witr causal relationship को साफ़ तौर पर व्यक्त करता है
- नतीजतन “क्या, कैसे, क्यों, और किस context में चल रहा है” को इंसानों के पढ़ने लायक रूप में आउटपुट करता है
मुख्य लक्ष्य
- किसी process के मौजूद होने की वजह समझाना, और सिर्फ run हो रहा है या नहीं उससे आगे की जानकारी देना
- debugging और incident response का समय कम करना
- बिना configuration के तुरंत इस्तेमाल योग्य, read-only·safe
- पूर्णता से ज़्यादा स्पष्टता को प्राथमिकता
- monitoring, performance analysis, और auto-recovery features शामिल नहीं हैं
काम करने का तरीका
- हर target को process (PID) के केंद्र में रखकर समझता है
- port, service, container, command — सबको PID से जोड़ता है
- PID के आधार पर execution causal chain बनाता है
- चार मुख्य सवाल
- क्या चल रहा है
- यह कैसे शुरू हुआ
- इसे क्या बनाए रखे हुए है
- यह किस context से जुड़ा है
समर्थित target
- इनपुट के रूप में process/service name, PID, port number को सपोर्ट करता है
- name देने पर अगर कई processes match हों, तो PID चुनने को कहता है
--pid, --port options से किसी खास process या port पर analysis किया जा सकता है
आउटपुट संरचना
- Target: यूज़र द्वारा दिया गया target
- Process: executable, PID, user, command, start time, restart count
- Why It Exists: process की causal ancestry chain
- Source: execution के लिए ज़िम्मेदार मुख्य सिस्टम (जैसे systemd, docker, pm2, cron, shell में से एक)
- Context: working directory, Git repository, Docker container, bind information आदि
- Warnings: root privileges पर run होना, public interface पर listening, लंबे समय से चलना, ज़्यादा memory usage जैसी non-blocking warnings
command line options
--pid, --port: किसी खास PID या port का analysis
--short: एक लाइन का सार
--tree: पूरा process tree दिखाना
--json: JSON format में output
--warnings: सिर्फ warnings दिखाना
--no-color: रंग बंद करना
--env: सिर्फ environment variables दिखाना
--help: help दिखाना
installation और removal
- single static Linux binary के रूप में distribute किया जाता है
- script install (recommended)
- manual install
amd64, arm64 के लिए binaries सीधे डाउनलोड करें और checksum verify करें
- execute permission देने के बाद PATH में ले जाएँ
- verification और removal
witr --version, man witr से जाँचें
sudo rm -f /usr/local/bin/witr से हटाया जा सकता है
- Nix Flake support:
nix run github:pranshuparmar/witr -- --port 5000 से चलाया जा सकता है
platform और permissions
- सिर्फ Linux के लिए
- जानकारी इकट्ठा करने के लिए
/proc access का उपयोग
- कुछ process जानकारी देखने के लिए sudo privileges की ज़रूरत पड़ सकती है
अभी कोई टिप्पणी नहीं है.