Make-initrd development discussion
 help / color / mirror / Atom feed
* [make-initrd] [PATCH v1 00/11] Add accounting feature
@ 2023-06-15 17:59 Alexey Gladkov
  2023-06-15 17:59 ` [make-initrd] [PATCH v1 01/11] feature/procacct: New feature to debug initramfs Alexey Gladkov
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Alexey Gladkov @ 2023-06-15 17:59 UTC (permalink / raw)
  To: make-initrd

Привет!

Я написал фичу для отладки initramfs. Фича добавляет в бэкграунде процесс
аккаунтинга, который запускается на самых ранних этапах загрузки и собирает
данные о процессах. Перед запуском системного init формируется отчёт по
интересующим критериям.

Фича предназначена для отладки в тестах. Я хочу поразбираться, кто тратит больше
всего времени или cpu/memory. А то сейчас очень профилировать очень сложно.

Получилось сложнее, чем обычный acct(2), потому что я хотел получать не только
comm процесса т.к. у шелльных скриптов это bash. Хотелось максимально поймать
полный cmdline выполняемой программы.

Alexey Gladkov (11):
  feature/procacct: New feature to debug initramfs
  feature/procacct: Use epoll
  feature/procacct: Use default rcvbufsz
  feature/procacct: Track more values
  feature/procacct: Use msgtemplate instead of custom struct
  feature/procacct: Use nonblocking per-call
  feature/procacct: Add bpf helper
  feature/procacct: Add accounting report
  feature/procacct: Wait until procacct is initialized
  feature/procacct: Make procacct optional
  feature/procacct: Add to testing

 Makefile.in                                   |  10 +
 configure.ac                                  |  36 +
 data/etc/rc.d/rc.sysexec                      |  12 +
 data/etc/rc.d/rc.sysinit                      |  26 +-
 features/debug-procacct/README.md             |   3 +
 features/debug-procacct/config.mk             |   1 +
 .../debug-procacct/data/bin/procacct-report   | 117 ++++
 .../data/etc/initrd/cmdline.d/procacct        |   1 +
 features/debug-procacct/rules.mk              |   1 +
 features/debug-procacct/src/Makefile.mk       |  16 +
 features/debug-procacct/src/procacct-bpf.c    |  57 ++
 features/debug-procacct/src/procacct.c        | 634 ++++++++++++++++++
 features/debug-procacct/src/procacct.h        |  13 +
 testing/packages-altlinux                     |   3 +-
 testing/test-root-btrfs-subvol.cfg            |   2 +-
 testing/test-root-efi-partition.cfg           |   2 +-
 testing/test-root-efi-reqpartition.cfg        |   2 +-
 testing/test-root-luks+crypttab+noparam.cfg   |   2 +-
 testing/test-root-luks+lukskey-noparam.cfg    |   2 +-
 testing/test-root-luks+lukskey-plain.cfg      |   2 +-
 testing/test-root-luks+lukskey-raw.cfg        |   2 +-
 testing/test-root-luks-over-lvm.cfg           |   2 +-
 testing/test-root-luks-over-raid1.cfg         |   2 +-
 testing/test-root-luks.cfg                    |   2 +-
 testing/test-root-lvm+luks.cfg                |   2 +-
 testing/test-root-lvm.cfg                     |   2 +-
 testing/test-root-partition+usr.cfg           |   2 +-
 testing/test-root-partition.cfg               |   2 +-
 testing/test-root-pipeline.cfg                |   2 +-
 testing/test-root-raid1+raid5.cfg             |   2 +-
 testing/test-root-raid1-degraded.cfg          |   2 +-
 testing/test-root-raid1.cfg                   |   2 +-
 testing/test-root-raid5.cfg                   |   2 +-
 testing/test-root-sshfs-network-dhcp.cfg      |   2 +-
 testing/test-root-sshfs-network-static1.cfg   |   2 +-
 testing/test-root-zfs-partition.cfg           |   2 +-
 testing/testing-altlinux-local                |   9 +
 testing/testing-ks-initrd.cfg                 |   1 +
 38 files changed, 955 insertions(+), 29 deletions(-)
 create mode 100644 features/debug-procacct/README.md
 create mode 100644 features/debug-procacct/config.mk
 create mode 100755 features/debug-procacct/data/bin/procacct-report
 create mode 100644 features/debug-procacct/data/etc/initrd/cmdline.d/procacct
 create mode 100644 features/debug-procacct/rules.mk
 create mode 100644 features/debug-procacct/src/Makefile.mk
 create mode 100644 features/debug-procacct/src/procacct-bpf.c
 create mode 100644 features/debug-procacct/src/procacct.c
 create mode 100644 features/debug-procacct/src/procacct.h

-- 
2.33.8



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-15 17:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 17:59 [make-initrd] [PATCH v1 00/11] Add accounting feature Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 01/11] feature/procacct: New feature to debug initramfs Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 02/11] feature/procacct: Use epoll Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 03/11] feature/procacct: Use default rcvbufsz Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 04/11] feature/procacct: Track more values Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 05/11] feature/procacct: Use msgtemplate instead of custom struct Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 06/11] feature/procacct: Use nonblocking per-call Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 07/11] feature/procacct: Add bpf helper Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 08/11] feature/procacct: Add accounting report Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 09/11] feature/procacct: Wait until procacct is initialized Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 10/11] feature/procacct: Make procacct optional Alexey Gladkov
2023-06-15 17:59 ` [make-initrd] [PATCH v1 11/11] feature/procacct: Add to testing Alexey Gladkov

Make-initrd development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
		make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
	public-inbox-index make-initrd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.make-initrd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git