Live data from Hacker News

Exploring Linux command-line space time

fabiensanglard.net

31–39 of 39 posts

Re: Exploring Linux command-line space time

#31
post #28

Earlier quoted context omitted.

And I always read it as "The Featured Article"

I've always preferred "The Full Article", in contrast to reading _only_ the headline.

There is also "The Fine Article".

FWIW, all these things date back to the ancient Usenet "RTFM" (where M = manual) which would undermine an expansion of "featured" in my view (since manuals are not "featured", like links in news aggregators). The other alternative Fs still work, though.

Re: Exploring Linux command-line space time

#32
The second example says

"First allocate 1GiB, free it, then spawn a process which does the same but with 2GiB."

In the code it seems it is the parent process that does the second call too.

  if (pid != 0) {
    malloc_and_fill(1L 
The result is not affected but the wording is not very clear I think.

Re: Exploring Linux command-line space time

#33
Some terminals probably scroll sideways, but this `st` program seems to require running to completion. So, ^C does not give you any report at all.

While it does RSS not Proportional Set Size (PSS) { arguably parsing /proc/PID/smaps_rollup should be added } and does not integrate program launch with tracking or use netlink to track making kids, an alternative that might interest some is a scrolling terminal kind of log report out of the Nim https://github.com/c-blake/procs .

    pd -pBHd1 -f "%N %R % %J %a" $(pf firefox)
or launch the program with `prog &` and use the shell `$!` to specify the PID or add -D'RJ' to get differential reports (or many other things). On the plus side, this can track many other things besides just memory & kids { like IO in the above example, assuming your Linux has /proc/PID/io support compiled in }.

You could always capture the output and feed it to some plotting program.

Re: Exploring Linux command-line space time

#34
While I do like the idea, etc, and I know there are many examples of this, the actual name st is used by several other linux programs. Perhaps the author should consider calling it differently? For example (and I do have tape in most of my boxes, so st is installed on my main machine and my backup machine).

    st SCSI Tape device
    st simple terminal
Just wondering how others handle conflicts like this too...

Re: Exploring Linux command-line space time

#35
post #24

Earlier quoted context omitted.

> Does anyone have a single CSS sheet with a similar style, instead of individual elements/lines all being spans with inline css? Sorry what are you asking?

I've seen this design style before. I'm hoping there's an existing model to work from, e.g. how Tufte css spawned many individual layouts but instead inspired by a terminal.

He talks about his theme here:

https://fabiensanglard.net/html/index.html

Re: Exploring Linux command-line space time

#36
post #13

Wow, Collect2 sounds kinda hacky based on the linked documentation¹: - There is user code that needs to run before main. With C/C++ allowing separate compilation, the compiler invocation that creates the entrypoint doesn't know about all of these static constructors. - Therefore Collect2 pretends to be ld; when invoked, it tries to call the real ld and examines its output - It creates a c file with a table containing…

I'm pretty sure the documentation actually lies though.

Yes, `collect2` exists, but with the existence of all the modern linker sections and scripts, it simply forwards everything to `ld` unchanged. There's no sneaky inspection, C code generation, or second linking pass.

Re: Exploring Linux command-line space time

#37
post #32

The second example says "First allocate 1GiB, free it, then spawn a process which does the same but with 2GiB." In the code it seems it is the parent process that does the second call too. if (pid != 0) { malloc_and_fill(1L The result is not affected but the wording is not very clear I think.

Thank you for reporting this mistake. It is fixed now :) !

Re: Exploring Linux command-line space time

#38
post #13

Wow, Collect2 sounds kinda hacky based on the linked documentation¹: - There is user code that needs to run before main. With C/C++ allowing separate compilation, the compiler invocation that creates the entrypoint doesn't know about all of these static constructors. - Therefore Collect2 pretends to be ld; when invoked, it tries to call the real ld and examines its output - It creates a c file with a table containing…

IIRC collect2 is only required on a few weird platforms such as AIX.

Re: Exploring Linux command-line space time

#39
post #36
post #13

Wow, Collect2 sounds kinda hacky based on the linked documentation¹: - There is user code that needs to run before main. With C/C++ allowing separate compilation, the compiler invocation that creates the entrypoint doesn't know about all of these static constructors. - Therefore Collect2 pretends to be ld; when invoked, it tries to call the real ld and examines its output - It creates a c file with a table containing…

I'm pretty sure the documentation actually lies though. Yes, `collect2` exists, but with the existence of all the modern linker sections and scripts, it simply forwards everything to `ld` unchanged. There's no sneaky inspection, C code generation, or second linking pass.

Thanks for the clarification. I was questioning my sanity, because collect2 as described in the doc sounds not just hacky, but also like a waste of compile time.
Post reply on HN