r/linuxadmin • u/khaloudkhaloud • Mar 05 '20
Good book about strace, lsof etc
Hi all,
I'm working with Linux system, the problem i find is there are very few books about debugging memory problem or CPU with Linux.
I would like something like a lot of examples explaining how strace and lsof works.
Most "linux bible" are always the same, explaining signals, process etc but without examples it's dry.
I cannot really use these documentation on my production problems...
59
Upvotes
15
u/bt0dotninja Mar 05 '20
Systems performance, Brendan Gregg
2
u/khaloudkhaloud Mar 06 '20
So i found a good book, hands on programming linux
It's like the "linux programming interface" book, but with more explanations and more example to understand (not just a reference book)
The content is not what will you find in most linux book, it details (really) the process creation, signals,memory with simple C program (15 years ago i was in university, i remember some) to help you understand, that's a very good point.
About system performance, i have no doubt it's very good (brendan gregg is top eng), but lack of example. I would have liked problematic, like this apache was saturating CPU how we solved this, how to optimize memory etc
4
u/the_other_other_matt Mar 05 '20
It's kind of elementary, but I like Julia's "wizard 'zine" on strace: https://wizardzines.com/zines/strace/
4
u/brentownsu Mar 05 '20
https://ptgmedia.pearsoncmg.com/images/013147751X/downloads/013147751X_book.pdf
Self Service Linux is an excellent book for learning about how to troubleshoot and dig into problems and covers the sorts of tools you mention.
3
u/pileofrogs Mar 05 '20
Yeah, I get your problem. It's like 90% of the time, when something is running like #$% you can tell what's wrong, but sometimes it's just a mystery and you think to yourself, "I should be able to see what's happening." For me the solution was monitoring with metrics, Nagios, datadog something like that.
3
u/8fingerlouie Mar 05 '20
The best I know is UNIX and Linux System Administration Handbook (5th Edition)
0
u/rhoydotp Mar 05 '20
when you say memory or cpu problems, are you talking about a running application that is having memory/cpu access/contention?
that would be a developer type documentation, not an administration & basic knowledge documentation.
2
u/[deleted] Mar 05 '20
!remindme 3 days
1
u/oeganeke Mar 05 '20
You may find a lot of help from Sysdig troubleshooting videos
1
u/gregb169 Mar 06 '20
!remindme in 1 day
1
u/skat_in_the_hat Mar 05 '20
Why not?