Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 15 Dec 2019, 19:18
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to run system disgnostics in Puppy?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
memo

Joined: 28 Jun 2018
Posts: 154

PostPosted: Mon 02 Dec 2019, 08:18    Post subject:  How to run system disgnostics in Puppy?  

Hi all.

what can do to run some diagnostics about the system performance, privacy security and network traffic.

sometimes , the system seems to working well while there is a mess in the background that does not appear for beginners.

regards,

_________________
Xanialpup 7.5 32 bit
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3548
Location: 500 seconds from Sol

PostPosted: Mon 02 Dec 2019, 11:47    Post subject: Wifi Signal Strength  

There are a lot of builtin tools on the system sub-menu, such as HardInfo, Htop, Ipinfo and Pup-SysInfo. The latter is very comprehensive. It has several panels, each with several options. Suggest you explore what it reveals. Start with the Base Report under the System-Specs Panel.

The only application I've added to the above is wifi-Strength which, I think, is merely a "petted" version of an application mikeb found, http://murga-linux.com/puppy/viewtopic.php?p=721228#721228, maybe that being peebee's wifitray-0.3alpha-lx.pet, http://murga-linux.com/puppy/viewtopic.php?p=754304#754304.

At any rate, I've attached a pet. Read the above threads for evaluating the read-outs.
Wifi_Strength-0.1.pet
Description  Show wifi signal strength on taskbar.
pet

 Download 
Filename  Wifi_Strength-0.1.pet 
Filesize  7.97 KB 
Downloaded  9 Time(s) 
Back to top
View user's profile Send private message 
memo

Joined: 28 Jun 2018
Posts: 154

PostPosted: Mon 02 Dec 2019, 13:36    Post subject:  

Thanks for indicating these tools, but the main question is about how to use these in diagnostics , what entries should I pay attention for. what can be an indication of a malware , virus ...
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3548
Location: 500 seconds from Sol

PostPosted: Mon 02 Dec 2019, 15:24    Post subject: Scanning for Malware = Wasting your resources  

memo,

There are Linux anti-malware applications which perhaps you can install. You can look in the Additional Software Forum and/or using the Wellminded Search. http://wellminded.net63.net/. They were created for Linux systems which do not run as Frugal installs.

I've used Puppies as my primary, almost exclusive, operating system for about a decade and followed posts on the Forum for even longer. I've never had a virus or other malware infestation. I don't recall reading any post by someone who has.

If you want to worry about malware infestations, run Windows. If you want to stop worrying:
(1) Run Puppy as a Frugal Install, with Automatic Save turned off*, installing new pets immediately after a reboot and before you go online, or when you can't do the latter, such as when installing/configuring a web-browser, immediately after bootup and before surfing the web to do anything else.

Malware isn't airborne. It is spread through the Internet. (2) Keep your Web-browsers, wget, uget and openssl up to date. The publishers of these update them in part to prevent the spread of malware. Keeping these up-to-date will help prevent malware from even getting into RAM. But (1) is more important.

Malware scanners have two methods of performing. They can scan your system (RAM and Storage) for infections. If you run Puppies as above described, that's a waste of time. On shutdown/reboot RAM is cleared. On bootup your operating system is created anew in RAM from READ-ONLY file-systems with the exception of a SaveFile/Folder** which --if you've only written to as above described-- will also be free of any malware. Secondly, they can scan the packages/data you are downloading/streaming. Doing so will use the same amount of computer resources under any Linux as happens under Windows. Your computer will become as slow and unresponsive as if you were running Windows: all to prevent the occupation ONLY in RAM of malware which will be wiped-out by your shutdown/reboot.

*or with an adrv.sfs substituted for a SaveFile. An adrv.sfs is also READ-ONLY.

** I prefer SaveFiles for the following reason: It is theoretically possible for a cracker, having invaded your system while you surf, to directly write to and modify files in a SaveFolder. A SaveFile, however, can only be modified by (1) using the Save module or (2) mounting the SaveFile, copying its contents to a folder with the same name sans the sfs ending, editing the files in that folder, deleting the old SaveFile, packaging the folder as a new SaveFile, then deleting the folder. All of which takes time and computer resources. I think I would notice if such activity was taking place.
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 215

PostPosted: Mon 02 Dec 2019, 18:16    Post subject:  

It's easy to use arp-scan to scan for anything connected to your wifi network.
Code:
# arp-scan -lg
Interface: wlan0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.0.1   D-Link Corporation
192.168.0.105   NETGEAR
192.168.0.100   Dell Inc.
192.168.0.101   Roku, Inc.
192.168.0.103   Hewlett Packard

5 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9: 256 hosts scanned in 3.410 seconds (75.07 hosts/sec). 5 responded
#


A computer configured to not respond to an arp scan would not show up.

If the name of the device is "(Unkown)" you probably need to update the files in /usr/share/arp-scan/

get-oui needs a perl module to work, that my BionicPup doesn't have.

An easy way to update the files is to download the master.zip file from
https://github.com/royhills/arp-scan
unzip and copy them to /usr/share/arp-scan/
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 215

PostPosted: Mon 02 Dec 2019, 18:49    Post subject:  

Quote:
A SaveFile, however, can only be modified by ...

That is true of the squash file system ( .sfs files. )
It is not true for savfefiles (ext2,ext3,ext4)
Savefiles are not compressed or squashed or cramfsed in any way.

A savefile can be mounted read-only
but if a savefile is mounted rw (writable)
you can just add, delete, modify any files you want, directly.

Running BionicPup64 8.0 like a flash drive:
Code:
# df -h
unionfs               1.8G  402M  1.4G  23% /
/dev/loop0            279M  279M     0 100% /initrd/pup_ro2
/dev/loop1             57M   57M     0 100% /initrd/pup_z
/dev/loop2             64M   64M     0 100% /initrd/pup_a
/dev/mapper/savefile  119M  5.3M  111M   5% /initrd/pup_ro1

pup_ro2 are the original Puppy operating files
pup_z are driver modules
pup_a is a previous savefile converted to a read-only .sfs file (a remaster)
pup_ro1 is the savefile, readable and writable.
(/dev/mapper/ because it is encrypted)
unionfs is the operating system's file system. (the layered fs)

The way Puppy runs as if the savefile is on a flash drive:
The savefile is mounted rw (writable.)
I can write directly to the folder /initrd/pup_ro1
I can directly create new files, modfiy any file, delete any file.
These changes are written directly to the savefile.
The changes will still be there next time you run Puppy.
Whether you save to the savefile or not.

For example:
Code:
# echo 'This file system is writable' > /initrd/pup_ro1/root/writable.txt

Code:
# mount
/dev/mapper/savefile on /initrd/pup_ro1 type ext4 (rw,noatime)
Back to top
View user's profile Send private message 
memo

Joined: 28 Jun 2018
Posts: 154

PostPosted: Tue 03 Dec 2019, 06:06    Post subject:  

@ williams2

Thanks for the detailed answer, Also for the codes that you have provided.

@ mikeslr

Thanks!
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3548
Location: 500 seconds from Sol

PostPosted: Tue 03 Dec 2019, 15:01    Post subject:  

Thanks, William. Smile I didn't know that one could write thru pup_ro1. Embarassed Rolling Eyes

I'll have to rethink my strategies. Perhaps further explore nic007's technique for replacing my savefile/folder with an sfs storage file, http://murga-linux.com/puppy/viewtopic.php?p=944470#944470. I'm not sure whether there aren't similar techniques available.

As a practical matter once I've set up my system I almost never execute a Save. The exceptions being (1) laziness in updating applications by installing pets before doing a remaster; and (2) updating the system to use a newer version of an SFS or adding some SFS to those I want available at bootup.

Thinking in this area again, I also wonder if running web-browers other than "as spot" from /home/spot may not present a security risk. My computers have more than sufficient RAM to enable me to use that approach.
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 215

PostPosted: Tue 03 Dec 2019, 20:04    Post subject:  

Quote:
what can do to run some diagnostics about the system performance, privacy security and network traffic

htop is very useful. It shows memory usage, cpu usage, what programs are running, allows you to set niceness, allows you to kill processes, etc etc.
htop is in the menu somewhere, or type "htop" in a console text terminal.
<shift>+M sorts by memory used
<shift>+C sorts by cpu used
t is tree view
h is help

There are some useful command line programs, (type in a text terminal)
like iostat, mpstat, vmstat.
for example,
Code:
mpstat --help

wpa_cli is useful if you have wifi. For example:
Code:
wpa_cli status
wpa_cli help


netstat is useful for network information.
Code:
netstat --help

iftop and nethogs can show you what internet connections
are using your bandwidth.
wavemon is useful for wifi (install with Puppy package manager)

Pup-SysInfo (in the menu or run in a text terminal)
displays tons of information.

gdmap show you the sizes of your files.
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 215

PostPosted: Tue 03 Dec 2019, 20:24    Post subject:  

Quote:
I also wonder if running web-browers other than "as spot" from /home/spot may not present a security risk

spot is very limited.

Many Linux distros run as an unprivileged user that by default have all the powers of root, using sudo.

For example, spot is much more limited than Ubantu's default unprivileged user.

In Bionicpup and Xenialpup spot does not have any root powers using sudo. Plus, spot can not become root using su because the suid bit is not set on su.

Running as spot is definitely more limited then running as root
which is probably at least a little bit safer. But also a bit less convenient.

I usually run firefox as root, and have never had a problem that I know of.

I run links most of the time, also as root,
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 215

PostPosted: Tue 03 Dec 2019, 21:15    Post subject:  

mikeslr,

If you run Puppy for the first time, in ram, with no save file/folder/partition
Puppy copies the pup.sfs file to ram and mounts the pup.sfs file read-only usually at /initrd/pup_ro2/ and creates a tmpfs file system in ram, usually at /initrd/pup_rw/. The tmpfs file system is completely empty to start with.

Then aufs makes a unionfs file system using the pup.sfs file system as the bottom layer, and the writable tmpfs file system in ram as the top layer.

Any changes, additions to the unionfs file system are put in the tmpfs file system.

If you shut down Puppy and let it create a savefile, your changes which are all in the tmpfs file system in ram, are copied to the savefile. Next time you start Puppy, you can use the savefile changes.

Or you can not save your changes to a savefile and next time you start Puppy it will be exactly the same as the first time, pup.sfs at the bottom and a comletely empty tmpfs it ram at the top.

If you want you can modify the pup.sfs, that is, changing the pup.sfs file the way you want. This is called remastering.

Then you can start Puppy in ram with no savefile, and all your changes will be there, in the pup.sfs's read-only file system. And if you start Puppy again in ram, your remastered Pup will start exactly the same as the last time.

You can also leave the pup.sfs file unchanged, and put your changes in an adrv.sfs file. The next time Puppy starts it will put the pup.sfs on the bottom, then the adrv.sfs on top of that, and the tmpfs filesystem on top. Exactly the same as the original pup.sfs running in ram only, and exactly the same as a remastered pup.sfs running in ram only.

That is, with no savefile, it starts exactly the same each time. Nothing is changed unless you deliberately remaster the pup.sfs file or the adrv.sfs file.

I am running Bionicpup64 8.0 with an adrv.sfs file that effectively remasters Puppy. It starts completely in ram, no savefile, exactly the same each time.
There are no hard drives or any other drives mounted. I have a script that mounts my hard drive and automatically unzips files from a tar archive that I previously saved, like a savefile but not. For example, I copy all the files in /root/my-applications/bin/ to the tar.gz archive file. Then, the next time I start Puppy or make an adrv.sfs file it will have all the files in the tar.gz file too.

I wrote my own remaster-adrv script. Very simple, it copies the files in /initrd/pup_a to /tmp/a1/ (pup_a is the old adrv.sfs file which is already mounted) then copy the files in /initrd/pup_rw/ over the top of /tmp/a1/. Then it makes a new adrv.sfs from /tmp/a1/ using mksquashfs. Takes about 5 or 6 minutes.

Basically, nothing in my Puppy changes unless I deliberately change it.
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3548
Location: 500 seconds from Sol

PostPosted: Tue 03 Dec 2019, 22:54    Post subject:  

Thank you again, William. Very clear and informative. I've copy your post to a word-processing file and saved it for later exploration. That is, I'll later follow the steps and see if I can duplicate your result.

Until I do, I won't be certain whether at shutdown/reboot the nag GUI about creating a Save will materialized. Not sure what I want to do if it does. With AutoSave turned off I belief it can just be ignored. IIRC, nic007 or rufwoof posted about #-out the snap-merge line somewhere in /Etc. But I think a more versatile approach would be to first copy the original under a different name so that a Save could be executed in those rare instances when the need may arise.

Perhaps you might consider posting a link in the How to Section to your post with a Title such as "Another way to operate without a SaveFile/Folder". Buried in the thread on the Beginner's Section, it may not reach many who would be interested.
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 215

PostPosted: Wed 04 Dec 2019, 00:01    Post subject:  

Quote:
the nag GUI about creating a Save

In my case, I edited /usr/sbin/shutdownconfig and changed
Code:
[ "$TIMELIMIT" ] || TIMELIMIT=60

to
Code:
[ "$TIMELIMIT" ] || TIMELIMIT=60
TIMELIMIT=5

So you have 5 seconds to hit the save button (to create a savefile.)
5 seconds is not long to wait for it to time out and automatically shut down without creating a savefile.

This was one of the suggestions in nic007's adrv thread.

Quote:
"Another way to operate without a SaveFile/Folder"

I'm really not doing anything different to what nic007 was doing.
I was just pointing out that whether you boot
the original pup.sfs in ram only with no savefile,
or a remastered pup.sfs in ram with no savefile,
or the original pup.sfs with an adrv.sfs in ram only with no savefile,
Puppy runs the same way in each case.

In each case, the Puppy operating system is in the sfs file(s)
with a blank tmpfs file system in ram to make it writable.
With no savefile, it will boot each time exactly the same, unchanged, pristine.
Unless you deliberately modify the .sfs file(s).
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 215

PostPosted: Wed 04 Dec 2019, 00:26    Post subject:  

This is the script I wrote, to remaster an adrv.sfs file for Bionicpup64 8.0, slightly modifed (so untested.)

gzipped, just click to unzip.

notes:
Uses /tmp for temporary space.
Which is in ram.
I have 4G ram, and for me, this script uses less than 200M.
You might have a problem if you try to install a lot of stuff.
In that case you would need to use a drive for temp space.

Usage: Boot Puppy. Change/configure Puppy the way you want.
Run the remaster3 script in a console terminal to make a (new) adrv,sfs file.
Should work with or without a savefile.
Probably won't work using pfix=nocopy.

nic007's scripts should work better for general purpose usage.
I just thought you could see how simple a script can be.
Basically, copy files, mksquashfs.
remaster3.gz
Description  gzipped, download and click to unzip.
gz

 Download 
Filename  remaster3.gz 
Filesize  391 Bytes 
Downloaded  7 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0624s ][ Queries: 13 (0.0053s) ][ GZIP on ]