logoalt Hacker News

yjftsjthsd-htoday at 4:55 PM1 replyview on HN

  # Find processes connected to a specific port
  psc 'socket.dstPort == uint(443)'

  # Filter by PID range
  psc 'process.pid > 1000 && process.pid < 2000'

It seems weird to require the user to remember that ports have to be marked uint when it doesn't look like anything else does.

Replies

ralferootoday at 6:30 PM

PIDs haven't been limited to 16-bits for a long time. I guess the default integer in these things is 32-bit signed.

But, yeah, this could be solved if uint promoted to larger for the comparison.