Please add a command line option or environment variable or toggle key that modifies "D", "d", "o" commands to only show physical disks
You can get the list of disks in linux from sysfs filesystem, similarly to 'lsblk -d'
I tried using disk groups but that does not show the same information as "D" command does.
Also this[1] patch is unuseful since it is permissive (it allows selective exclusion) while I need nmon to be restrictive (to show a list and exclude everything else)
We are having some problem with the filesystems automonted by autofs
if mounting requires authentication. When nmon try to open this kind
of mount points it get authentication errors (that generates system
malfunctions on the our machines).
It is possible to exclude the stats on the remote filesystems when nmon
run in non-interactive mode? Maybe we could modify jfs_load function to
skip loading of the filesystems belong to a list (hard-coded o by a
command line parameter passing) FS types.
If you think this could be a useful feature we can patch the current code.
Best Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have not heard of any one using automaount with passwords.
Can't the root user be used?
Sorry but given I don't want to set up automount nor use authentication it is a low priority for me.
I guess this beomes a special patch that you need to apply.
Cheers, Nigel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is the output when trying to use -g auto. I'm using the precompiled version nmon15e_MPGinc_24_July_2015.tar.gz
root@home:/usr/local/src# nmon_x86_64_debian7 -g auto
opening disk group file: No such file or directory
ERROR: failed to open auto
strace output below. What I don't understand is why are you not surfing the sysfs kernel filesystem tree similar to how lsblk tool does - is it for compatibility with ancient linux systems?
if yes, look how fdisk is trying to determine if a block device is a physical device in is_whole_disk function http://code.metager.de/source/xref/busybox/util-linux/fdisk.c#is_whole_disk
stat("/proc/diskstats", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
open("/proc/diskstats", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f84dc98f000
read(7, " 8 0 sda 40291 28092 247"..., 1024) = 1024
read(7, "0 14900 43088\n 8 49 sdd1 "..., 1024) = 483
read(7, "", 1024) = 0
lseek(7, 0, SEEK_SET) = 0
mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f84dc8ed000
open("auto", O_RDONLY) = -1 ENOENT (No such file or directory)
dup(2) = 8
fcntl(8, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(8, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f84dc98e000
lseek(8, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(8, "opening disk group file: No such"..., 51opening disk group file: No such file or directory
) = 51
close(8) = 0
munmap(0x7f84dc98e000, 4096) = 0
write(2, "ERROR: failed to open auto\n", 27ERROR: failed to open help
) = 27
exit_group(9) = ?
+++ exited with 9 +++
It would also be useful to be able to have another option to include/exclude zfs zvol block devices like /dev/zd0 (fdisk finds it as a valid disk, but I'd rather have it excluded from "-g auto" view). For this you simply need to exclude major number 230 of the block device (https://github.com/zfsonlinux/zfs/issues/515#issuecomment-4459005)
Last edit: costinel 2015-11-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear author,
Please add a command line option or environment variable or toggle key that modifies "D", "d", "o" commands to only show physical disks
You can get the list of disks in linux from sysfs filesystem, similarly to 'lsblk -d'
I tried using disk groups but that does not show the same information as "D" command does.
Also this[1] patch is unuseful since it is permissive (it allows selective exclusion) while I need nmon to be restrictive (to show a list and exclude everything else)
thanks
[1] https://sourceforge.net/p/nmon/discussion/985541/thread/b69d6ab4/?limit=25#93d8
This has been added to nmon for Linux version 15. nmon -g auto
Let me know what you think.
This is, of course, trying to work around what I think of as a Linux kernel bug = mixing disks and partition in one /proc/diskstats file.
Dear Authore,
related to the request https://sourceforge.net/p/nmon/discussion/985541/thread/c711d3ed/#746d
We are having some problem with the filesystems automonted by autofs
if mounting requires authentication. When nmon try to open this kind
of mount points it get authentication errors (that generates system
malfunctions on the our machines).
It is possible to exclude the stats on the remote filesystems when nmon
run in non-interactive mode? Maybe we could modify jfs_load function to
skip loading of the filesystems belong to a list (hard-coded o by a
command line parameter passing) FS types.
If you think this could be a useful feature we can patch the current code.
Best Regards
Hi,
I have not heard of any one using automaount with passwords.
Can't the root user be used?
Sorry but given I don't want to set up automount nor use authentication it is a low priority for me.
I guess this beomes a special patch that you need to apply.
Cheers, Nigel
Dear Nigel,
This is the output when trying to use -g auto. I'm using the precompiled version nmon15e_MPGinc_24_July_2015.tar.gz
strace output below. What I don't understand is why are you not surfing the sysfs kernel filesystem tree similar to how lsblk tool does - is it for compatibility with ancient linux systems?
if yes, look how fdisk is trying to determine if a block device is a physical device in is_whole_disk function http://code.metager.de/source/xref/busybox/util-linux/fdisk.c#is_whole_disk
my diskstats look like this:
It would also be useful to be able to have another option to include/exclude zfs zvol block devices like /dev/zd0 (fdisk finds it as a valid disk, but I'd rather have it excluded from "-g auto" view). For this you simply need to exclude major number 230 of the block device (https://github.com/zfsonlinux/zfs/issues/515#issuecomment-4459005)
Last edit: costinel 2015-11-17
Hello costinel and Mr Nigel, sorry answering too late, but I passed through the same problem today, and that's the way I deal with that.
I realized that the auto file was being generated in the current directory before moving to my log directory using "-m" option.
My first solution was entering the directory before executing the nmon command:
For example:
cd /opt/ramoon/log;exec /usr/bin/nmon -f -t -s 30 -c 2880 -g auto -D -m /opt/ramoon/log
After that, I realized that using the "-m" option before the "-g auto -D" was a better approach, and the "cd" wouldn't be necessary:
exec /usr/bin/nmon -m /opt/ramoon/log -f -t -s 30 -c 2880 -g auto -D