Cov txheej txheem:

Kuv yuav nrhiav tau qhov chaw nres nkoj ntawm PID hauv Unix li cas?
Kuv yuav nrhiav tau qhov chaw nres nkoj ntawm PID hauv Unix li cas?

Video: Kuv yuav nrhiav tau qhov chaw nres nkoj ntawm PID hauv Unix li cas?

Video: Kuv yuav nrhiav tau qhov chaw nres nkoj ntawm PID hauv Unix li cas?
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Plaub Hlis Ntuj
Anonim

Qhib lub davhlau ya nyob twg. Ntaus hauv cov lus txib: sudo netstat -ano -p tcp. Koj yuav tau cov zis zoo ib yam li qhov no. Saib-tawm rau lub TCP chaw nres nkoj nyob rau hauv daim ntawv teev npe chaw nyob thiab nco ntsoov qhov sib xws PID naj npawb.

Ib sab ntawm no, kuv yuav nrhiav tau kuv qhov chaw nres nkoj PID li cas?

Netstat hais kom ua

  1. Koj tuaj yeem pom qhov chaw nres nkoj siv nyob rau hauv kab thib ob hu ua Chaw Nyob. Koj yuav pom tus lej chaw nres nkoj tom qab txoj hnyuv loj.
  2. Mus tom ntej thiab kos lub thawv rau PID (Cov Txheej Txheem Txheej Txheem) thiab tom qab ntawd nyem OK.
  3. Tam sim no koj yuav tsum pom PID nrog rau lub npe txheej txheem hauv tus thawj tswj haujlwm.
  4. Thiab qhov ntawd yog hais txog nws!

Ib sab saum toj no, kuv yuav nrhiav tau tus txheej txheem ID hauv Linux li cas? Cov txheej txheem nrhiav cov txheej txheem los ntawm lub npe ntawm Linux

  1. Qhib daim ntawv thov davhlau ya nyob twg.
  2. Ntaus pidof hais kom ua raws li hauv qab no txhawm rau nrhiav PID rau firefox txheej txheem: pidof firefox.
  3. Los yog siv cov lus txib ps nrog rau grep hais kom ua raws li hauv qab no: ps aux | grep -i firefox.
  4. Txhawm rau saib lossis teeb tsa cov txheej txheem raws li kev siv lub npe:

Yog li ntawd, qhov chaw nres nkoj twg yog txheej txheem mloog?

Lub lsof lossis Daim Ntawv Teev Npe Qhib Cov Ntaub Ntawv Pabcuam pab sau tag nrho cov ntaub ntawv qhib ntawm koj lub Linux system. Peb tuaj yeem siv qhov khoom siv no los saib tag nrho txheej txheem qhib rau ib qho tshwj xeeb chaw nres nkoj . Cia peb siv lsof los saib cov kev pabcuam mloog rau ib qho tshwj xeeb chaw nres nkoj . Cov lus txib no yuav sau tag nrho txheej txheem siv TCP chaw nres nkoj npe 80.

Kuv tuaj yeem kuaj tau li cas yog tias qhov chaw nres nkoj qhib?

Txoj Kev 4 Txheeb xyuas yog tias Lub Chaw Router Hauv Zos qhib (Windows)

  1. Pab tau? Qhib Telnet rau Windows.
  2. Qhib qhov hais kom ua.
  3. Ntaus ipconfig ntawm qhov hais kom ua thiab nias ↵ Enter.
  4. Sau tus router tus IP chaw nyob.
  5. Ntaus telnet ntawm qhov hais kom ua thiab nias ↵ Enter.
  6. Ntaus qhib (router tus IP chaw nyob) (tus lej chaw nres nkoj).
  7. Nias ↵ Enter.

Pom zoo: