dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
22.14k stars 1.66k forks source link

AIX as supported OS request #591

Closed bobblestiltskin closed 7 years ago

bobblestiltskin commented 7 years ago

bash-4.4$ ./neofetch Unknown OS detected: 'AIX', aborting... Open an issue on GitHub to add support for your OS. bash-4.4$

Hello,

I use AIX daily and your tool may be of use to me. If you require any specific AIX assistance, please ask.

Bob

konimex commented 7 years ago

Whoa, an AIX system, that's rare.

Since we have no access to AIX systems, we will definitely need your help.

We will need the full outputs of:

Also, does running ifconfig without any flags cause errors? I knew the Solaris (Oracle) ones did.

Does AIX have any package managers?

bobblestiltskin commented 7 years ago

On Tue, Jan 03, 2017 at 07:30:59AM -0800, Herdiansyah wrote:

Since we have no access to AIX systems, we will definitely need your help.

Hi and thanks for the swift response

We will need the full outputs of:

  • prtconf

bash-4.4$ prtconf System Model: IBM,8284-22A Machine Serial Number: 212131W Processor Type: PowerPC_POWER8 Processor Implementation Mode: POWER 7 Processor Version: PV_7_Compat Number Of Processors: 1 Processor Clock Speed: 3425 MHz CPU Type: 64-bit Kernel Type: 64-bit LPAR Info: 16 bobaixgcc62 Memory Size: 4096 MB Good Memory Size: 4096 MB Platform Firmware level: SV830_068 Firmware Version: IBM,FW830.10 (SV830_068) Console Login: enable Auto Restart: true Full Core: false NX Crypto Acceleration: Capable and Enabled

Network Information Host Name: bobaixgcc62 IP Address: 10.10.28.62 Sub Netmask: 255.0.0.0 Gateway: 10.0.1.100 Name Server: 10.0.1.110 Domain Name: cristie.com

Paging Space Information Total Paging Space: 512MB Percent Used: 2%

Volume Groups Information ============================================================================== Active VGs ============================================================================== rootvg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 639 0 00..00..00..00..00 hdisk1 active 319 253 64..61..00..64..64 hdisk2 active 319 319 64..64..63..64..64 ==============================================================================

INSTALLED RESOURCE LIST

The following resources are installed on the machine. +/- = Added or deleted from Resource List.

  • lsdev

bash-4.4$ lsdev L2cache0 Available L2 Cache cd0 Available Virtual SCSI Optical Served by VIO Server cluster0 Available Cluster Node en0 Available Standard Ethernet Network Interface ent0 Available Virtual I/O Ethernet Adapter (l-lan) et0 Defined IEEE 802.3 Ethernet Network Interface hd1 Defined Logical volume hd2 Defined Logical volume hd3 Defined Logical volume hd4 Defined Logical volume hd5 Defined Logical volume hd6 Defined Logical volume hd8 Defined Logical volume hd10opt Defined Logical volume hd11admin Defined Logical volume hd9var Defined Logical volume hdisk0 Available Virtual SCSI Disk Drive hdisk1 Available Virtual SCSI Disk Drive hdisk2 Available Virtual SCSI Disk Drive inet0 Available Internet Network Extension iocp0 Defined I/O Completion Ports iscsi0 Available iSCSI Protocol Device lg_dumplv Defined Logical volume livedump Defined Logical volume lo0 Available Loopback Network Interface lvdd Available LVM Device Driver mem0 Available Memory nsmb0 Available N/A pkcs11 Available PKCS#11 Device proc0 Available 00-00 Processor pty0 Available Asynchronous Pseudo-Terminal rcm0 Defined Rendering Context Manager Subsystem rootvg Defined Volume group sfw0 Available Storage Framework Module sys0 Available System Object sysplanar0 Available System Planar vio0 Available Virtual I/O Bus vsa0 Available LPAR Virtual Serial Adapter vscsi0 Available Virtual SCSI Client Adapter vty0 Available Asynchronous Terminal bash-4.4$

  • lspv - I believe this is for listing HDDs

bash-4.4$ lspv hdisk0 00fa2131d34da185 rootvg active
hdisk1 00fa21319e9f8e8d rootvg active
hdisk2 00fa2131f393349e rootvg active
bash-4.4$

  • sar -r 1 1

sar -r 1 1

AIX bobaixgcc62 1 6 00FA21314C00 01/03/17

System configuration: lcpu=4 mem=4096MB ent=0.10 mode=Uncapped

09:38:49 slots cycle/s fault/s odio/s 09:38:50 128174 0.00 32.00 13.00

  • ls --version 2&>1 (Yes, it will produce error, we need full outputs of the error)

bash-4.4$ ls --version 2&>1 bash-4.4$ exit $ ls --version 2&>1 [1] 10158228 $ ls: Not a recognized flag: - ls: Not a recognized flag: v Usage: ls [-1ACFHLNRSabcdefgiklmnopqrstuxEUX] [File...]

[1] + Done(2) ls --version 2&>1 $ which ls /usr/bin/ls $ bash bash-4.4$ which ls /usr/bin/ls bash-4.4$ rpm -qf /usr/bin/ls file /usr/bin/ls is not owned by any package bash-4.4$ lslpp -w /usr/bin/ls File Fileset Type

/usr/bin/ls bos.rte.commands File bash-4.4$ ls --version ls: Not a recognized flag: - ls: Not a recognized flag: v Usage: ls [-1ACFHLNRSabcdefgiklmnopqrstuxEUX] [File...] bash-4.4$ ls --version 2>&1 ls: Not a recognized flag: - ls: Not a recognized flag: v Usage: ls [-1ACFHLNRSabcdefgiklmnopqrstuxEUX] [File...] bash-4.4$

Hmmm - not sure what happened the first time it was run (Oh I see - transposed & and > ?). I hope that I have provided the required information.

Also, does running ifconfig without any flags cause errors? I knew the Solaris (Oracle) ones did.

Yes, it does, a switch is required - usually use '-a' for all viz:

bash-4.4$ ifconfig usage: ifconfig -a [ -d ] [ -u ] [ af ] ifconfig -l [ -d ] [ -u ] ifconfig interface [ af [ address [ dest_addr ] ] [ netmask mask ] [ broadcast addr ] [ alias ] [ delete ] ] [ up ] [ down ] [ detach ] [ af first[alias] address [ ... ] ] [ site6 site_number ] [ metric n ] [ mtu n ] [ arp | -arp ] [ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ] [ tcp_low_rto n | -tcp_low_rto ] [ inet6 scope n zone n ] [[ inet4 | inet6 ][address transfer newinterface]] ifconfig tap_interface [ create | destroy ] bash-4.4$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.10.28.62 netmask 0xff000000 broadcast 10.255.255.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255 inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1 bash-4.4$

kD

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/dylanaraps/neofetch/issues/591#issuecomment-270140409

Thank you very much for picking this up quickly :-)

If I can be of any further assistance, please ask!

Bob --

libc6 is not essential :|
konimex commented 7 years ago

For memory, we can probably use vmstat. What is the output of vmstat and vmstat -v?

Hmmm - not sure what happened the first time it was run (Oh I see - transposed & and > ?). I hope that I have provided the required information.

Well, we only need the error message since there are so many differing ls programs (currently, we're supporting BusyBox, GNU, Solaris, Toybox and BSD ls) to get an installation date of a certain system, they have different flags to display full date and time. Since we won't get the error message if they're sent to stderr, we redirect them to stdout.


For uptime, what is the output?

Also, does AIX have any package managers?

bobblestiltskin commented 7 years ago

On Tue, Jan 03, 2017 at 08:11:28AM -0800, Herdiansyah wrote:

For memory, we can probably use vmstat. What is the output of vmstat and vmstat -v?

bash-4.4$ vmstat

System configuration: lcpu=4 mem=4096MB ent=0.10

kthr memory page faults cpu


r b avm fre re pi po fr sr cy in sy cs us sy id wa pc ec 2 1 641564 2869 0 0 0 91 172 0 174 1446 141 2 3 94 0 0.01 10.2 bash-4.4$ vmstat -v 1048576 memory pages 1005664 lruable pages 2804 free pages 1 memory pools 388613 pinned pages 80.0 maxpin percentage 3.0 minperm percentage 90.0 maxperm percentage 38.7 numperm percentage 390030 file pages 0.0 compressed percentage 0 compressed pages 38.7 numclient percentage 90.0 maxclient percentage 390030 client pages 0 remote pageouts scheduled 15434 pending disk I/Os blocked with no pbuf 0 paging space I/Os blocked with no psbuf 1972 filesystem I/Os blocked with no fsbuf 2615 client filesystem I/Os blocked with no fsbuf 33481 external pager filesystem I/Os blocked with no fsbuf 62.5 percentage of memory used for computational pages bash-4.4$

Hmmm - not sure what happened the first time it was run (Oh I see - transposed & and > ?). I hope that I have provided the required information.

Well, we only need the error message since there are so many differing ls programs (currently, we're supporting BusyBox, GNU, Solaris, Toybox and BSD ls) to get an installation date of a certain system, they have different flags to display full date and time. Since we won't get the error message if they're sent to stderr, we redirect them to stdout.


For uptime, what is the output?

bash-4.4$ uptime 10:39AM up 26 days, 4:14, 2 users, load average: 1.84, 2.05, 1.86 bash-4.4$

Also, does AIX have any package managers?

AIX has its native package manager - this is installp, lslpp et al.

It also supports RPM, and the two databases can be synchronised (to some degree?) with updtvpkg.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/dylanaraps/neofetch/issues/591#issuecomment-270151082

Bob -- Silverman's Law: If Murphy's Law can go wrong, it will.

konimex commented 7 years ago

Disregard previous comment/e-mail.

Alright, what's the output of svmon -G? Also, is the behaviour of svmon -G like top (i.e. won't close and will keep updating until you close it manually)?

bobblestiltskin commented 7 years ago

On Tue, Jan 03, 2017 at 06:47:50PM -0800, Herdiansyah wrote:

Alright, what's the output of svmon -G?

svmon -G

           size       inuse        free         pin     virtual

mmode memory 1048576 1041833 6743 399137 654835 Ded pg space 131072 2902

           work        pers        clnt       other

pin 362046 0 1123 35968 in use 654835 0 386998

PageSize PoolSize inuse pgsp pin virtual s 4 KB - 577865 2902 116241 190867 m 64 KB - 28998 0 17681 28998

Bob

bobblestiltskin commented 7 years ago

On Tue, Jan 03, 2017 at 06:49:46PM -0800, Herdiansyah wrote:

Disregard previous comment/e-mail.

Alright, what's the output of svmon -G? Also, is the behaviour of svmon -G like top (i.e. won't close and will keep updating until you close it manually)?

Already replied to previous. Here is the output again.

svmon -G

           size       inuse        free         pin     virtual mmode

memory 1048576 1041833 6743 399137 654835 Ded pg space 131072 2902

           work        pers        clnt       other

pin 362046 0 1123 35968 in use 654835 0 386998

PageSize PoolSize inuse pgsp pin virtual s 4 KB - 577865 2902 116241 190867 m 64 KB - 28998 0 17681 28998

It is a one-shot program in this mode. However, if I add

-i

I see output like ...

svmon -G -i 2

           size       inuse        free         pin     virtual mmode

memory 1048576 1041928 6648 399121 654853 Ded pg space 131072 2911

           work        pers        clnt       other

pin 362030 0 1123 35968 in use 654853 0 387075

PageSize PoolSize inuse pgsp pin virtual s 4 KB - 577960 2911 116241 190885 m 64 KB - 28998 0 17680 28998 size inuse free pin virtual mmode memory 1048576 1041938 6638 399121 654863 Ded pg space 131072 2911

           work        pers        clnt       other

pin 362030 0 1123 35968 in use 654863 0 387075

PageSize PoolSize inuse pgsp pin virtual s 4 KB - 577970 2911 116241 190895 m 64 KB - 28998 0 17680 28998 size inuse free pin virtual mmode memory 1048576 1041938 6638 399121 654863 Ded pg space 131072 2911

           work        pers        clnt       other

pin 362030 0 1123 35968 in use 654863 0 387075

PageSize PoolSize inuse pgsp pin virtual s 4 KB - 577970 2911 116241 190895 m 64 KB - 28998 0 17680 28998 ^C#

So the output is appended, so it does not refresh the output buffer as 'top' does.

The full command-line switches for svmon are :

^C# svmon -p

Bad syntax

usage:
svmon -G [-O Options] [-i Interval [NumIntervals] ] svmon -S [SID1...SIDN] [-O Options] [-t Count] [-i Interval [NumIntervals] ] svmon -P [PID1... PIDN] [-O Options] [ [-t Count] [-i Interval [NumIntervals] ] svmon -C Command1...CommandN [-O Options] [-t Count] [-i Interval [NumIntervals] ] svmon -U [LogName1...LogNameN] [-O Options] [-t Count] [-i Interval [NumIntervals] ] svmon -D SID1..SIDN [-O Options] [-i Interval [NumIntervals] ] svmon -W [ClassName1...ClassNameN] [-O Options] [-t Count ] [-i Interval [NumIntervals] ] svmon -T [Tier1...TierN] [-O Options] [-a SupClassName] [-t Count ] [-i Interval [NumIntervals] ] svmon -X [-o Filename] [-O Options] [-i Interval [NumIntervals] ] [-c ]

-a restricts the scope to the subclasses of the SupClassName parameter (in the Tier report) -c used with the -X flag, allows to add a comment to the XML report -i instructs svmon to display statistics repetitively -o specifies the output file for the -X flag -O -O option=value, ... ] activeusers=[on | off] affinity=[on | detail | off] commandline=[on | off] file_mem_scan=[on| off] (default is off) filename=[on | off] filtercat=[off exclusive kernel shared unused unattached] filterpgsz=[off s m L S] filterprop=[off notempty data text] filtertype=[off working persistent client] format=[80 | 160 | nolimit] frame=[on | off] mapping=[on | off] maxbufsize=[KB | MB | GB] mpss=[on | off] overwrite=[on | off] pgsz=[on | off] pidlist=[on | number | off] process=[on | off] range=[on | off] segment=[on | category | off] shmid=[on | off] sortentity=[inuse | virtual | ....] (depending on the selected summary) sortseg=[inuse | pin | pgsp | virtual] subclass=[on | off] summary=[basic | longreal | ame | longame] svmonalloc=[on | off] threadaffinity=[on | off] timestamp=[on | off] tmem=[on | off] unit=[auto | page | KB | MB | GB] -t displays memory usage statistics for the top count object to be printed

I see that svmon -P details process information e.g.

svmon -P | head -40


 Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit

Mthrd 16MB 7536876 rmcd 81771 67558 0 81517 N Y N

 PageSize                Inuse        Pin       Pgsp    Virtual
 s    4 KB               54651      54534          0      54397
 m   64 KB                1695        814          0       1695

Vsid      Esid Type Description              PSize  Inuse   Pin

Pgsp Virtual 8601d8 2 work process private sm 51223 51204 0 51223 9000 d work shared library text m 1145 307 0 1145 8002 0 work kernel segment m 550 507 0 550 83054c f work shared library data sm 2270 2270 0 2270 81c547 3 work working storage sm 857 857 0 857 8383ae 1 clnt code,/dev/hd2:151741 s 254 194 - - 8383ce - work s 47 9 0 47 83c38f - clnt /dev/hd9var:36952 s 0 0 - - 820548 4 work working storage sm 0 0 0 0 87c25f - clnt /dev/hd2:152262 s 0 0 - - 81c3a7 6 mmap maps 3 source(s) sm 0 0 - - 85c4b7 - clnt /dev/hd9var:37025 s 0 0 - - 8784be - clnt /dev/hd9var:37026 s 0 0 - - 83024c - clnt /dev/hd9var:36947 s 0 0 - - 824549 5 work working storage sm 0 0 0 0


 Pid Command          Inuse      Pin     Pgsp  Virtual 64-bit

Mthrd 16MB 1704018 shlap64 64409 8160 0 64398 Y N N

 PageSize                Inuse        Pin       Pgsp    Virtual
 s    4 KB                3225          0          0       3214
 m   64 KB                3824        510          0       3824

Vsid      Esid Type Description              PSize  Inuse   Pin Pgsp Virtual

85c017 90000000 work shared library text m 3193 0 0 3193 8002 0 work kernel segment m 550 507 0 550 14005 9ffffffd work shared library sm 2521 0 0 2521 860018 9001000a work shared library data m 75 0 0 75 864019 90020014 work shared library s 613 0 0 613

Bob -- Bureaucrat, n.: A person who cuts red tape sideways. -- J. McCabe

konimex commented 7 years ago

Alright, what is the output of lslpp -l | head -5 and lslpp -L | head -5?

Out of curiosity, do you have any X instances inside your AIX?

bobblestiltskin commented 7 years ago

On Wed, Jan 04, 2017 at 02:20:14AM -0800, Herdiansyah wrote:

Alright, what is the output of lslpp -l | head -5 and lslpp -L | head -5?

lslpp -l | head -5

Fileset Level State Description

Path: /usr/lib/objrepos DirectorCommonAgent 6.3.3.1 COMMITTED All required files of Director Common Agent, including JRE,

lslpp -L | head -5

Fileset Level State Type Description (Uninstaller)

DirectorCommonAgent 6.3.3.1 C F All required files of Director Common Agent, including JRE, LWI #

Out of curiosity, do you have any X instances inside your AIX?

This machine has no X (it is a virtual machine, accessed only via ssh). I can find one of the real physical machines to run commands on, which do have X11 running, if this is required.

Bob

konimex commented 7 years ago

This machine has no X (it is a virtual machine, accessed only via ssh). I can find one of the real physical machines to run commands on, which do have X11 running, if this is required.

Not required for essentials (CPU, Memory, etc).

So, this means we can't use -l and -L for listing all installed packages. Let's try lslpp -h | head -9.

Also, actually we have a working branch of aix. If you have git you can clone konimex/neofetch.git and go to the aix branch. Or you can just download it at http://github.com/konimex/neofetch/archive/aix.tar.gz

I want to know how fast/slow neofetch runs, so maybe the command will be time ./neofetch.

bobblestiltskin commented 7 years ago

On Wed, Jan 04, 2017 at 03:40:39AM -0800, Herdiansyah wrote:

This machine has no X (it is a virtual machine, accessed only via ssh). I can find one of the real physical machines to run commands on, which do have X11 running, if this is required.

Not required for essentials (CPU, Memory, etc).

So, this means we can't use -l and -L for listing all installed packages. Let's try lslpp -h | head -9.

Also, actually we have a working branch of aix. If you have git you can clone konimex/neofetch.git and go to the aix branch. Or you can just download it at http://github.com/konimex/neofetch/archive/aix.tar.gz

I want to know how fast/slow neofetch runs, so maybe the command will be time ./neofetch.

I downloaded the tarball, and unpacked and see ...

bash-4.4# time ./neofetch --ascii_distro gentoo_small

real 0m5.253s user 0m0.351s sys 0m0.287s bash-4.4# bash -x ./neofetch

Thank you so much for all your work so far in implementing this for me :-)

Without specifying an ascii_distro, I see the program hang at "get_ascii", however, if I do specify one I see the output given running under 'time'.

I did look at the options, but see none for no-ascii. I want the exact opposite of ...

-L, --logo                  Hide the info text and only show the ascii logo.

I will read through the code, and look at whether I can implement this. I may also make further requests, since my real desire is for the output of neofetch to be consumed by other processes. For this, I maybe want to have explicitly marked-up output sans logo (I am thinking XML for now). I am more than happy to submit a patch for this, when I have tested on AIX and Linux?

Bob -- Most rock journalism is people who can't write interviewing people who can't talk for people who can't read. -- Frank Zappa

dylanaraps commented 7 years ago

Without specifying an ascii_distro, I see the program hang at "get_ascii", however, if I do specify one I see the output given running under 'time'.

Yup, ascii art for AIX hasn't been added yet. Once we add it the hang won't occur. I'll take a closer look and see if I can remove the hang altogether. Neofetch should be falling back to no ascii mode when this happens instead of getting stuck.

I did look at the options, but see none for no-ascii. I want the exact opposite of ... -L, --logo Hide the info text and only show the ascii logo.

--image off will do what you're looking for. I'll edit the docs to make this clearer.

konimex commented 7 years ago

Yeah, it was stuck in get_ascii because apparently I forgot to put (at least a placeholder) ASCII there. That was my bad.

So, for the outputs, the output of Memory is clearly inaccurate, maybe I got the array wrong. I will need a direct access to any AIX systems available though, so I can get my hands on the AIX ls and tinker with it.

@dylanaraps, for the AIX VM, maybe we can arrange it for tomorrow or the day after. But man, is that thing expensive...

dylanaraps commented 7 years ago

Yeah, it was stuck in get_ascii because apparently I forgot to put (at least a placeholder) ASCII there. That was my bad.

I fixed the ascii hang in #595.

for the AIX VM, maybe we can arrange it for tomorrow or the day after. But man, is that thing expensive...

Yup, being able to rent it on a day by day basis makes things affordable though. I'm willing to get at most 3 days access but I doubt we'll need it for that long. We'll see. :)

konimex commented 7 years ago

I'm willing to get at most 3 days access but I doubt we'll need it for that long.

Nah, at most I'll just need one or two days to set up bash and git and do the testing. Unless you want to expand to HP-UX too :p

As for #595, I'll rebase it into my branch after you merged it to master.

bobblestiltskin commented 7 years ago

On Wed, Jan 04, 2017 at 07:08:16AM -0800, Herdiansyah wrote:

I'm willing to get at most 3 days access but I doubt we'll need it for that long.

Nah, at most I'll just need one or two days to set up bash and git and do the testing. Unless you want to expand to HP-UX too :p

If you require any assistance setting up your AIX box, I will be available (generally) for advice. I have been working with AIX for three years so know some things about it.

I am in the UK - at work 08:30-17:30 GMT

bobblestiltskin commented 7 years ago

On Wed, Jan 04, 2017 at 06:21:03AM -0800, Dylan Araps wrote:

Without specifying an ascii_distro, I see the program hang at "get_ascii", however, if I do specify one I see the output given running under 'time'.

Yup, ascii art for AIX hasn't been added yet. Once we add it the hang won't occur. I'll take a closer look and see if I can remove the hang altogether. Neofetch should be falling back to no ascii mode when this happens instead of getting stuck.

I did look at the options, but see none for no-ascii. I want the exact opposite of ... -L, --logo Hide the info text and only show the ascii logo.

--image off will do what you're looking for. I'll edit the docs to make this clearer.

It still gets stuck with --image off ...

bash -x ./neofetch --image off

dylanaraps commented 7 years ago

Is this with the latest master (with the hang fix)?

If it still occurs with the latest master, I'll need to take a closer look when I rent the server tomorrow.

bobblestiltskin commented 7 years ago

On Wed, Jan 04, 2017 at 07:20:15AM -0800, Dylan Araps wrote:

Is this with the latest master (with the hang fix)?

If it still occurs with the latest master, I'll need to take a closer look when I rent the server tomorrow.

Ah, no, that was with the version I had already downloaded. Sorry!

dylanaraps commented 7 years ago

All good. I also just realized that you can't test the fix until it's merged into @konimex's branch! So hold off on testing it for now. :)

bobblestiltskin commented 7 years ago

On Wed, Jan 04, 2017 at 07:25:44AM -0800, Dylan Araps wrote:

All good. I also just realized that you can't test the fix until it's merged into @konimex's branch! So hold off on testing it for now. :)

I have been keeping my director up to date and he says ...

Also, their CPU usage collection uses "ps aux" which isn't really the right way to determine CPU usage: [1]http://unix.stackexchange.com/questions/58539/top-and-ps-not-showing-the-same-cpu-result. I think this might be wrong for AIX as well as I don't know if AIX supports "aux"?

ps aux does work on AIX ...

ps aux

USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND root 1114146 0.2 0.0 448 448 - A Dec 08 239:58 wait root 1048608 0.2 0.0 448 448 - A Dec 08 238:11 wait root 983070 0.1 0.0 448 448 - A Dec 08 194:27 wait root 131076 0.1 0.0 448 448 - A Dec 08 86:07 wait root 12845118 0.0 1.0 32220 33280 - A Dec 16 16:44 /usr/sbin/rsct root 721054 0.0 0.0 628 632 - A Dec 08 22:51 /usr/sbin/sync

And the ps is an IBM packaged one

which ps

/usr/bin/ps

rpm -qf /usr/bin/ps

file /usr/bin/ps is not owned by any package

lslpp -w /usr/bin/ps

File Fileset Type

/usr/bin/ps bos.rte.control File #

also on this box I do have top -

rpm -qip /home/guest/rpms/top-3.8beta1-2.aix5.1.ppc.rpm

Name : top Relocations: (not relocateable) Version : 3.8beta1 Vendor: (none) Release : 2 Build Date: Tue Sep 8 02:05:13 CDT 2009 Install date: (not installed) Build Host: aix51.perzl.org Group : Monitoring Source RPM: top-3.8beta1-2.src.rpm Size : 150116 License: Freely Redistributable URL : http://www.unixtop.org/ Summary : Full-Screen Process Display Description : Top is a program that will give continual reports about the state of the system, including a list of the top cpu using processes.

This all just FYI, though it may help?

konimex commented 7 years ago

Alright. What is the output of svmon -G -O unit=MB and lslpp -h | head -9?

bobblestiltskin commented 7 years ago

On Thu, Jan 05, 2017 at 10:46:49PM -0800, Herdiansyah wrote:

Alright. What is the output of svmon -G -O unit=MB and lslpp -h | head -9?

svmon -G -O unit=MB

Unit: MB

           size       inuse        free         pin     virtual available   mmode

memory 4096.00 4081.34 14.7 1601.21 2679.78 1236.25 Ded pg space 512.00 11.6

           work        pers        clnt       other

pin 1456.32 0 4.39 140.50 in use 2679.78 0 1401.56

lslpp -h | head -9

Fileset Level Action Status Date Time

Path: /usr/lib/objrepos DirectorCommonAgent 6.3.3.1 COMMIT COMPLETE 10/17/16 10:51:42

DirectorPlatformAgent 6.3.3.1 COMMIT COMPLETE 10/17/16 10:51:39

konimex commented 7 years ago

Does running svmon requires you to be root? If it does, we may need alternative methods.

Also, what is the output of df -P -g / ?

bobblestiltskin commented 7 years ago

On Fri, Jan 06, 2017 at 03:36:03AM -0800, Herdiansyah wrote:

Does running svmon requires you to be root? If it does, we may need alternative methods.

su - bob

$ bash bash-4.4$ svmon size inuse free pin virtual mmode memory 1048576 1045263 3313 409962 686517 Ded pg space 131072 2987

           work        pers        clnt       other

pin 372871 0 1123 35968 in use 686517 0 358746

PageSize PoolSize inuse pgsp pin virtual s 4 KB - 550015 2987 116954 191269 m 64 KB - 30953 0 18313 30953 bash-4.4$

No, svmon does not require root access. I am a regular user.

Also, what is the output of df -P -g / ?

bash-4.4$ df -P -g / Filesystem GB blocks Used Available Capacity Mounted on /dev/hd4 0.31 0.25 0.06 81% / bash-4.4$

konimex commented 7 years ago

Hmm.. I think using a pastebin-like solution for output might be better.

If you have curl installed in your AIX system, you can do df -P -g | curl -F c=@- http://ptpb.pw and paste the URL here.

bobblestiltskin commented 7 years ago

On Sun, Jan 08, 2017 at 01:14:34AM -0800, Herdiansyah wrote:

Hmm.. I think using a pastebin-like solution for output might be better.

If you have curl installed in your AIX system, you can do df -P -g | curl -F c=@- http://ptpb.pw and paste the URL here.

bash-4.4$ df -P -g | curl -F c=@- http://ptpb.pw date: 2017-01-09T09:02:44.022362+00:00 digest: 628f4c188d45fa9662b1982ebfb0bd1ebb78ad56 long: AGKPTBiNRfqWYrGYLr-wvR67eK1W short: eK1W size: 742 status: created url: http://ptpb.pw/eK1W uuid: 6ed8dbfd-7150-4d37-b50a-f74314ff6083 bash-4.4$

konimex commented 7 years ago

Alright, so I can confirm that every functions work correctly (except fetching packages and install date), you can test it out by downloading http://github.com/konimex/neofetch/archive/aix.tar.gz and confirm that it works (or not).

bobblestiltskin commented 7 years ago

On Mon, Jan 09, 2017 at 01:26:09AM -0800, Herdiansyah wrote:

Alright, so I can confirm that every functions work correctly (except fetching packages and install date), you can test it out by downloading http://github.com/konimex/neofetch/archive/aix.tar.gz and confirm that it works (or not).

Looks good - results in paste bin ...

bash-4.4$ ./neofetch | curl -F c=@- http://ptpb.pw date: 2017-01-09T11:18:30.197322+00:00 digest: 4d9f5452ceb8d4be7b48ce00abb925ef2bcce912 long: AE2fVFLOuNS-e0jOAKu5Je8rzOkS short: zOkS size: 1479 status: created url: http://ptpb.pw/zOkS uuid: 5e8146ca-6d04-4eb6-bfc9-333d8a3df63e bash-4.4

Or ...

bash-4.4$ ./neofetch :+ssssossossss+- bob@bobaixgcc62 .oys///oyhddddhyo///sy+. --------------- /yo:+hNNNNNNNNNNNNNNNNh+:oy/ OS: AIX 6.1.0.0 00FA21314C00 :h/:yNNNNNNNNNNNNNNNNNNNNNNy-+h: Model: IBM,8284-22A ys.yNNNNNNNNNNNNNNNNNNNNNNNNNNy.ys Kernel: 1 h+-mNNNNNNNNNNNNNNNNNNNNNNNNNNNNm-oh Uptime: 31 days, 22 hours, 41 mins h+-NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN.oy Shell: ksh /dmNNNNNNN/::mNNNd::m+:/dNNNo::dNNNdm: CPU: PowerPC_POWER8 ( 1) @ 3.4GHz h//NNNNNNN: . .NNNh mNo od. -dNNNNN:+y Memory: 1186MB / 4096MB .sNNNNNN+ -N/ -NNh mNNd. sNNNNNNNo-m N.sNNNNNs +oo /Nh mNNs` /mNNNNNNo-m //NNNNh ossss +h md- .hm/ sNNNNN:+y :dmNNN+/yNNNNNd//y//h//oNNNNy//sNNNdm- yo-NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNm.ss h+-mNNNNNNNNNNNNNNNNNNNNNNNNNNNNm-oy sy.yNNNNNNNNNNNNNNNNNNNNNNNNNNs.yo :h+-yNNNNNNNNNNNNNNNNNNNNNNs-oh- :ys:/yNNNNNNNNNNNNNNNmy/:sy: .+ys///osyhhhhys+///sy+. -/osssossossso/-

bash-4.4$

dylanaraps commented 7 years ago

Here's a screenshot of your paste bin.

Direct link: http://i.imgur.com/z9hpnR4.png

2017-01-09-222111_642x410_scrot

@konimex, it looks like we'll have to maybe disable kernel on AIX since the output is just 1.

Also, there's an extra space in the cores number so we'll have to trim that.

konimex commented 7 years ago

Damn, I made another mistake in the memory part, it should be fixed by the next time you redownload the tar file.