3

I Want to check Memory usage of the Particular program.

I'm trying to use the memusage command, as documented in its manpage which is also present in Ubuntu. But running it produces

root@username:~# memusage filename
No command 'memusage' found, did you mean:
Command 'gmemusage' from package 'gmemusage' (universe)
memusage: command not found

I want to check the memory usage for a program by using the memusage command. What do I have to do?

If I try to install this command like this I get:

Root@Username#apt-get install memusage
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package memusage
2
  • Obviously the program is not installed. – Buddika Jul 31 '18 at 9:52
  • if I try to install its showing like this In Question I edited @Buddika – niranjan pawar Jul 31 '18 at 9:59
4

What do I have to do?

  1. Obtain the Debian source package for GNU libc.
  2. Ensure that it builds the memusagestat command.
  3. Patch the files in its debian/debhelper.in directory so that the the malloc/memusage.sh script and the memusagestat command are included in one of the existing built binary packages, or a new memusage package. They currently are not.
  4. Contact the Debian Maintainers for this project and get them to incorporate your patches into the official Debian source.
  5. Get the Ubuntu people to build new binary packages. Debian is of course the origin of the Ubuntu packages.
  6. Install the new/modified binary package.

This procedure, in particular steps 3, 4, and 5, takes some time.

5
  • 2
    I take the OP is confused that man memusage is giving a description for a command that is not installed nor can be installed. The answer is that, indeed, there isn't any package for memusage. – kiamlaluno Jul 31 '18 at 10:24
  • Steps 4 and 5 can be circumvented by building the package locally (but both should be done in parallel). Part of the confusion stems from the fact that the manpages are shipped by the manpages package and not anything related to the GNU C library. – Stephen Kitt Jul 31 '18 at 10:29
  • Also note that the Debian maintainers should be contacted using the listed maintainer address, which is debian-glibc@lists.debian.org, not individually. The best approach is really to file a bug. – Stephen Kitt Jul 31 '18 at 10:31
  • … and hope that it does not languish for 13 years like Debian Bug #334120 has. (-: – JdeBP Jul 31 '18 at 10:39
  • I'm Using UBUNTU 17.10. so what should I do for that @JdeBP – niranjan pawar Aug 1 '18 at 4:32
1

As stated in Bug#91815, the binaries are no longer shipped with the libc6 package.

So you would have to download the sources (apt source libc6) then get the required dependencies (apt build-dep libc6), and then compile.

Looks like the bug is being addressed as of July 8 2020 though.

2
  • $ apt source libc6 Reading package lists... Done Picking 'glibc' as source package instead of 'libc6' E: Unable to find a source package for glibc – Bram Jul 10 '20 at 20:00
  • 1
    @Bram you need the deb-src lines in your repository configuration. – Stephen Kitt Aug 24 '20 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.