methods:
something <<< $variable is signficantly slower than: echo $variable | something
so I replaced almost all instances of <<< with echo ...|
I've seen speed differences of up to 10% but it's not consistent, so this is just
something to boost performance slightly on older systems I'd guess.
when the supybot
'SHELL' command is used, 'CALL' gives the user irc client data, and
supybot etc are
not detectable.
Fine tuned some error message lengths so they fit into 80 columns or so.
for systems with a lot of them, that will clean up the output.
Added dynamic wrapping to --recommends and -c 94-99.
These are the main things, there's a few smaller issues with -xx output on -N/-n/-i but
those will noly really show with full output and it takes a while to get this stuff stable
so maybe some other time, but it's ok for now.
the bus id itself to determine if the
VGA compatible controller
3D controller
Display Controller
refer to separate chips or the same one.
Bus id gives the data needed, because the video chip, the real card, that is,
is on for example 00:05.0 the trailing .0 is the key, that's the actual card.
The audio or display controller for the same card would be for example: 00:05.1
I don't know if this is fully reliable, but it will have to do, either some cards
as is get missed, or some cards get double id'ed, unless I use a hack like this.
There's nothing else I can find but the bus id to determine that it's the same
physical device or not.
to graphics card detection, that's a new one on me. Dual card systems might use this.
00:02.0 Display controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation NV44A [GeForce 6200] (rev a1)
Some more switches to bash native methods as well.
${var} to $var where appropriate to avoid extra overhead of ${..}; removed 'basename'
and replaced with ${path##*/} which avoids unnessary subshells.
Fixed dynamic line wraps on -I and -S lines, now those in most cases will work well
down to 80 cols.
Fixed bug in optical drives, at some point in the last few years, the kernel in /sys
changed the path to the optical drive data, added in /ata8/ (example) so both methods
are now handled. This should fix a lot of failures to show optical drive brand name etc.
Added weechat detection, trying also supybot/limnoria detection in irc client version.
There was weechat-curses, but I guess they finally dropped the -curses. Limnoria is
a fork of supybot but still uses the supybot program name, but added in limnoria too
if they get around to changing that.
More dynamic sizing tweaks, more optimization of code. Discovered that dipping into gawk
is almost 250x more expensive in terms of execution time than using bash variable.
Will change to use bash directly as time goes along where it's safe and accurate.
Added handling to support /run paths using directories, like /run/gdm/gdm.pid for dm data.
time to make it easier to test stuff one by one.
Full refactoring/reordering of top global variables, moved user/maintainer set variables
to top, and clearly identify all globals.
Changed LINE_MAX to COL_MAX but all user configuration files will stay working since
inxi now will check for that and translate them to the new variable names.
New lines fixed, -C cpu and -f cpu plus full flags. Flags output is now fully dynamic to
display screen in terminal/console. Moved cpu short flags to -x because it's not that
important in general and just clutters things up in my opinion.
Print flags/bogomips on separate line if line greater than display width.
The rest of the lines will get a similar treatment, but it takes a bit of trial and error
for each line to get it working right.
Note that IRC line lengths are NOT dyanamic unless I can find a way to determine the column
width of irc clients, but that won't be accurate since fonts vary in widths for each character.
CPU was the worst offender in my opinion in terms of regular output wrapping to new line messily,
next will be the things with ports/chip id/card id.
Tightened up a bit more the dyanamic help / version output handler.
window column width help/version outputs. There is a significant slowdown to achieve this,
but I've optimized it as much as I could so it should be acceptable for most users now.
type if openrc). -xx shows init / rc version number. Change runlevel to target if
systemd and if non numeric runlevel given. Should support systemd/upstart/epoch/runit
sysvinit. Supports openrc as extra data if it's present. Rearranged -I line a bit but
really just exchanged Runlevel: for Init: v: Runlevel: default:
This is the first step, some of the init system ID methods are weak and non robust
and this may need to be revised, but it should for now identify systemd/upstart quite
accurately, and in most cases sysvinit. Note that to get sysvinit version number requires
tool: strings which in debian/ubuntu is in package binutils. I don't know the package names
for arch/fedora/etc for the recommends check tool in inxi yet.
I believe this will be good enough for a first draft version, but over time we'll get it
more fine tuned, but as it is now, it should cover at least 99% of users, which isn't bad.
for adding alternate display servers, like Wayland or Mir. Rather than release all the
stuff at once I'm going to do it bit by bit. Currently I have not found a wayland iso
test cd that boots in virtual box so I will have to wait to really add support there.
to show default runlevel, using systemd/upstart/sysvinit type default tests.
Fixed gtk library version detections, now will support dpkg/pacman version tests, which
should give more data to more people than previously, where the old tests usually would
return null unless gtk dev packages were installed on the system.
and so version numbers failed. Now first trying gnome-session to get version number.
Also, there's a bug in at least gtk detection in opensuse, not sure what it is, they could
be using a different syntax for the test:
pkg-config --modversion gtk+-3.0
returns no such package on gnome 3.10 installs, but I have no idea what package name to
test for there in this case.
So leaving gtk version bugs unhandled due to no user information or feedback, if you want
it fixed or if it works for your distro, let me know and also if it does not work, tell
me the correct commmand, with its output, to get gtk version.
That's for inxi -Sx output that is.
repo type output, the initial listing was not complete of possible syntaxes. Now handles:
Nonfree Updates (Local19) /mnt/data/mirrors/mageia/distrib/cauldron/x86_64/media/nonfree/updates
as well, apparently that is a possible output format in certain cases with urpmq.
Non urpmq distros ignore this update, there are no other actual changes.
Other distros than Mandriva, Mageia, no other changes so no need to update unless you want to.
This adds support for Mandriva, Mageia. urpmq parsing is similar but not identical to pisi.
are actually loaded. Since we can't fix xorg, inxi will try to work around this bug by validating
one step further in the Xorg.0.log data, to confirm that drivers noted as loaded/unloaded/failed are
actually running the display(s) of the system.
There is a possible case of error that might happen due to this change in the case of a system with
a complex xorg that uses two drivers/modules to run two different displays, ie, nvidia on one, and amd
on the other, for example, or intel/nvidia, etc. However, if that bug appears, we'll get that data set
of debugging output and fix it at that point.
This fix repairs an existing xorg bug that is unlikely to get fixed any time soon (the call to load the
detected drivers, eg, vesa, intel, is repeated, causing a failure of driver already loaded on the second
occurance.
so I've updated that. -f for ARM now shows features instead of flags, and the -C regular cpu output does not
show cache/flags for arm cpus becuase they don't have those features.
Added some flags passed to various cpu functions and better detections of ARM cpu to handle dual core and other
issues that were not handled before as well, or at all.
cases. This required fixing some core logic assumptions that are not currently correct, particularly
on two cases, some xeon cpus fail to show core id for each core, showing 0 for all of them, second,
vm cpus do not show physical ids at all for at least intel, nor do they show core id.
While we can't get HT totally reliable, particularly for vm xeon, since inxi has no way to know in
that case if a core is attached to a physical core or a virtual one, all of them being virtual in that
case, but still inxi is now reporting the correct number of cores, or threads in vm xeons, and is not
showing multicore cpus as single core, which was the main issue.
This required redoing the counter logic for the cpu/core/physical arrays, now they are set independently,
and can handle any of the others not being set, without creating an error or failure condition.
Also added in last check for a certain intel case where core id is 0 but > 1 physical cores exist, that
now also shows the correct cpu / core count.
While this is tested on many data sets of proc cpuinfo, it's still possible there is a fringe case I have
not seen that will trigger yet another unexpected behavior.
zypp or yum it will work. If it's both then it will show only one I believe, if that's a possible scenario, no idea.
Added one more fix for those pesky intel vm cpu core errors, now if /proc/cpuinfo shows no siblings at all,
and no core_id, but does have physical id, it will use the count for physical id as a default for core count.
Not perfect, but better than calling a dual core cpu a single core.
There's still a lot of mysteries with vm versions of kvm cpus, for example, if you see a dual core xeon, is
that actually one core with ht, or two cores? There is no way to find that information out that I can see that is
reliable.
/proc/partitions of 253, which made the disk totals fail to show up at all. Added that in.
Moved sourcing of configuration files to right after initialize_data so that some variables
can be forced to different values before the next set of system/app checks.
This is to allow specifically turning off, for some headless servers where $DISPLAY is not
null due to a bash configuration bug, these:
B_SHOW_X_DATA='false'
B_RUNNING_IN_X='false'
Setting those two to false in inxi.conf will turn off all the X checks etc even if the $DISPLAY
is set to non null.
Added in support for ksplice kernel version, requires installed uptrack-uname, if that is
present and if uptrack-name kernel version is different from uname then it will add (ksplice)
to kernel version string, and use ksplice kernel version. Also created a single function
get_kernel_version for use by short form/long form inxi output.
For intel xeon cpus, trying a work around for a bug in /proc/cpuinfo which fails to show core_id
or physical_id for cpus, using siblings / 2 for xeons with no actual core counts.
Fixed a bug that made fixes for multimounted partitions fail for disk used. Added in support
for also excluding single partitions mounted to different places.
That was too hard to type and too hard to remember. Also do more dyanamic reordering of weather
output, depending on how much data is present, and how many x options are used.
Added error handling for generic deprecated options, and for options that do not have the correct
syntax for OPTARG, like with -W.
This should about do it for the weather option for now unless I missed something somewhere.
-! location= option, to indicate that users must replace space with + themselves.
Because of how bash handles these options, inxi cannot add in + signs itself automatically.
This should be closer to cleanup of this new feature.
a global that can be set in user / system configs to make a longer wget time out. Default
is 8 seconds.
This should take care of the failure from slow load issue reported.
weather -w option. With -x, -xx-, -xxx, shows more information. Basic line is just weather
and system time there. -x adds time zone, which is useful for servers, particurly web servers.
-x also adds wind speed. -xx adds humidity and barometric pressure. -xxx adds a possible new line,
if data is available, heat index, wind chill, and dew point.
-xxx also adds a line for location (blocked by irc/-z) / weather observation time.
-z filter applies as usual to location data, removes it in irc by default. -Z overrides override.
The api this uses is probably going to be dropped at some point, so this is just going to work
while it works, then it will need to be updated at some point, so don't get very attached to it.
Also adds option to, with -w: -! location=<location string>
This lets users send an alternate location using either <city,state> or <postal code>
or <latitude,longitude> (commas for city,state and latitude,longitude are not optional, and the order
must be as listed.
If There is a developer flag if distro maintainers do not want this enabled, simply set:
B_ALLOW_WEATHER='false'
before packaging and the weather feature will be disabled.
useage if bind mounts are used, ie, multiple binds to a single mount. Now inxi will
check a list of the previously used partitions before adding the size of the used space
to the total used, if the partition has already been used it will skip it. This was/is
a quick and dirty fix, but it's totally fine I believe and should resolve two separate
issues:
1. use of bind mount method, where multiple partition names are bound to the same partition
2. accidental dual mounting to the same partition.
partitions section will still show the same data, ie, if bind is used, it will show all
the bind mounts even when they are attached/bound to a partition that is already listed.
This seems useful information, though maybe we can get the key word 'bind' in there somehow,
but for now I won't worry about that issue, that's just a nice to have, not a bug.
linux driver version handling, now only trimming off number from bsd drivers.
Some linux drivers, like tg3 for broadcom ethernet, have numbers ending them. So this is
a bug fix for 1.8.44 release mainly.
Also includes openbsd initial fixes for some issues related to sysctl parsing for cpu and ram.
to bsd. Using a pciconf parser to do most of the heavy lifting in this one.
Two functions do the main pci card processing for audio, graphics, and networking.
All seems to be shipshape and working, tested on freebsd 7.3, 9.0, and 9.1 and
the output is consistent.
turns off all -h and -H menu options for updating. Also triggers an error message
if you use -U or -! <10-16/http://>.
Distro maintainers, take note, if you used the B_ALLOW_UPDATES flag, you no longer
need to change the code anywhere, the error messages and blocking the -h output for
update features is automatic as soon as the flag is set to 'false'.
I needed to change the -! handling because -! is now also being used for extra features
like -! 31 and -! 32 and probably more stuff in the future, plus the -! 30 used by
things like the inxi gui tool being worked on by trash80.
Also included in this version are more bsd changes, including initial function for pciconf
data parsing, this will be used for -A, -G, and -N options for card data.
Further bsd improvements are better error/no data available messages for -D and -o.
The hdd used still fails to properly calculate the actual raid sizes but that's a bit too tricky
to do easily so will leave that for some other time.
Also added in more hdd used partition types for bsds, wd and ad type drivers for disks.
partitions) would show components of the md raid array as unmounted partitions.
This is of course incorrect, and is now fixed.
Small update of man page as well to note that -o will not show components of mdraid arrays.
output for mdraid. Certain conditions would trigger a false return for raid components, now
it shows more explicitly the online/spare/failed data so it's clear. Also shows 'none' for
online if none are detected.