From: Stephen Hemminger <stephen@networkplumber.org>
To: Harshith Hari <harshithhari000111@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 v2] ss: add -P/--process-age option to display process runtime
Date: Tue, 15 Sep 2026 21:23:29 -0700 [thread overview]
Message-ID: <20260915212329.0d4f31f7@phoenix.local> (raw)
In-Reply-To: <20260915213100.77691-1-harshithhari000111@gmail.com>
On Wed, 16 Sep 2026 03:01:00 +0530
Harshith Hari <harshithhari000111@gmail.com> wrote:
> diff --git a/misc/ss.c b/misc/ss.c
> index 6c32455d..6058ca29 100644
> --- a/misc/ss.c
> +++ b/misc/ss.c
> @@ -56,58 +56,58 @@ static int show_process_age;
>
> static void print_process_age(pid_t pid)
> {
> -char path[64];
> -FILE *f;
> -unsigned long long starttime;
> -double uptime = 0.0;
> -long clock_ticks = sysconf(_SC_CLK_TCK);
> -
> -f = fopen("/proc/uptime", "r");
> -if (!f)
> -return;
> -
> -if (fscanf(f, "%lf", &uptime) != 1) {
> -fclose(f);
> -return;
> -}
> -fclose(f);
> + char path[64];
> + FILE *f;
> + unsigned long long starttime;
> + double uptime = 0.0;
> + long clock_ticks = sysconf(_SC_CLK_TCK);
> +
> + f = fopen("/proc/uptime", "r");
> + if (!f)
> + return;
>
You are not starting with existing upstream source!
There is no code with /proc/uptime in upstream version of misc/ss.c
Also the point of ss is to print info about sockets, not to
be a replacement for ps.
next prev parent reply other threads:[~2026-09-16 4:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 21:31 [PATCH iproute2 v2] ss: add -P/--process-age option to display process runtime Harshith Hari
2026-09-16 4:23 ` Stephen Hemminger [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-16 21:34 Harshith Hari
2026-09-17 19:46 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260915212329.0d4f31f7@phoenix.local \
--to=stephen@networkplumber.org \
--cc=harshithhari000111@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.