News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Recent posts

#21
avatar_genesis8
CPCWiki Discussion / Re: Need some linux help with ...
Last post by genesis8 - Yesterday at 13:15
I am using a debian 12 VM on OVH.

For just stats of Apache visitors, I am using Awstats

I am also using Fail2ban with the following personal rules to ban :

- too many 404 errors (trying to use known web pages of wordpress by example)
- SSH access not in a few authorized IP ranges (even if only one user is authorized for SSH access)
- ignoring error from my IP ranges, because I already got banned from my own rules :-)

Access to phpmyadmin is limited in Apache configuration with the same IP ranges authorized (my IP provider from home and for the phone)
#22
avatar_Emu
Emulators / Re: CPCEmu v3.0 (April 2025)
Last post by Emu - Yesterday at 13:13
Quote from: HAL6128 on Yesterday at 09:58SymbOS boots up to the desktop and then crashes...

Can you set CPCemu to 128k RAM (don't forget to restart), boot from "SymbOS-CPC40-Boot.dsk" with the M4 board disabled and make a 128k snapshot to post it here?

I have attached such a snapshot. What happens if you open it?
#23
avatar_HAL6128
Emulators / Re: CPCEmu v3.0 (April 2025)
Last post by HAL6128 - Yesterday at 13:12
Quote from: Emu on Yesterday at 13:02I just tried it in Windows 7, too, 5 Minutes ago. It did work, both from disk and from SD card.

Have you used fresh SymbOS downloads? My only idea is that you used "used" files (that had been subject to the "live" mode at least once).
 

I always downloaded a fresh version from internet and extracted it into directly the folder of the %APPDATA%\ROAMING\CPCEMU\SDCARD 
#24
avatar_Gryzor
CPCWiki Discussion / Re: Need some linux help with ...
Last post by Gryzor - Yesterday at 13:10
I *think* lsof was the first I tried, but the output format was not readable if directed to a file. But will try it again to double check, thanks! 
#25
avatar_Emu
Emulators / Re: CPCEmu v3.0 (April 2025)
Last post by Emu - Yesterday at 13:06
Quote from: HAL6128 on Yesterday at 12:24By the way: would it be possible to expand the Debugger Monitor to an external window?

For the desktop versions, yes, I think so. Might be a good idea.
#26
avatar_Emu
Emulators / Re: CPCEmu v3.0 (April 2025)
Last post by Emu - Yesterday at 13:02
Quote from: HAL6128 on Yesterday at 09:58Can confirm that M4 board emulation works now (means creating & deleting or diving into folders) in "image mode".

Thank you for being perseverant! Just for clarity: Using AMSDOS, the M4 SD card is always emulated "live". The distinction between "image" and "live" mode is only related to SymbOS, the latter directly accessing the FAT file system on the SD card by reading and writing its sectors.

In image mode, the host SDCARD folder ist compiled into an image file called VSD.IMG. All sectors are read from and written into this file. At the end (reset, exit) all files from the image file that are newer than in the host SDCARD folder are extracted into the latter.

In live mode, all sectors are translated to and from host files on-the-fly. I'm afraid that this is impossible without collisions. In this particular case, one practical problem is that SymbOS appears to keep a certain amount of directory sectors in a cache. Therefore, the translation by CPCemu needs to be consistent between subsequent reads and writes. Which is a bit difficult if, on the other hand, modified and new files in the host file system should be visible within SymbOS as soon as possible. Because of the caching it can become necessary to overflow the cache (e. g., looking into a folder with many files in it, the folder being different from the one where the modified/new host files are) to see host-side modifications from within SymbOS. Bad things happen if SymbOS is writing a file of the same name as a new host file before SymbOS has refreshed its cache.

Quote from: HAL6128 on Yesterday at 09:58SymbOS still doesn't work. Either the mass storage or the disc version (I created a freshly installation) nor the discs (small boot disc or hybrid). And it doesn't matter which RAM config I have chosen (128k, 512k or 576k)
Out of curiosity I installed a new Windows 11 (AND a Window 7 version) in VirtualBox with a different username (because of the assumption of the hyphen in the username). But still the same behaviour as in my original Win11.
SymbOS boots up to the desktop and then crashes...

I just tried it in Windows 7, too, 5 Minutes ago. It did work, both from disk and from SD card.

Have you used fresh SymbOS downloads? My only idea is that you used "used" files (that had been subject to the "live" mode at least once).
 
#27
avatar_lmimmfn
CPCWiki Discussion / Re: Need some linux help with ...
Last post by lmimmfn - Yesterday at 12:25
You can use:
lsof -i

It will show in columnar format the incomming connections to the server which can be imported to excel, heres a sample output:
COMMAND      PID    USER  FD  TYPE    DEVICE SIZE/OFF NODE NAME
node      667384 lmimmfn  63u  IPv4 197438208      0t0  TCP localhost:40022->localhost:27017 (ESTABLISHED)
node      667384 lmimmfn  64u  IPv4 197438209      0t0  TCP localhost:40036->localhost:27017 (ESTABLISHED)
node      667384 lmimmfn  65u  IPv4 197438210      0t0  TCP localhost:40048->localhost:27017 (ESTABLISHED)
node      667384 lmimmfn  66u  IPv4 197438211      0t0  TCP localhost:40052->localhost:27017 (ESTABLISHED)
node      667384 lmimmfn  67u  IPv4 197438230      0t0  TCP localhost:49218->localhost:6379 (ESTABLISHED)
node      667384 lmimmfn  68u  IPv4 197438231      0t0  TCP localhost:49232->localhost:6379 (ESTABLISHED)
node      667384 lmimmfn  69u  IPv4 197438232      0t0  TCP localhost:49236->localhost:6379 (ESTABLISHED)
node      667384 lmimmfn  70u  IPv6 197438874      0t0  TCP *:8585 (LISTEN)
node      667384 lmimmfn  71u  IPv4 197438875      0t0  TCP localhost:45638->localhost:50051 (ESTABLISHED)
node      667384 lmimmfn  72u  IPv4 197438879      0t0  TCP localhost:48272->localhost:27017 (ESTABLISHED)
node      667384 lmimmfn  73u  IPv4 197438884      0t0  TCP localhost:48282->localhost:27017 (ESTABLISHED)
node      667384 lmimmfn  74u  IPv6 197441725      0t0  TCP lmimmfn-dev:8585->100.120.44.137:52915 (ESTABLISHED)
node      667384 lmimmfn  76u  IPv6 197441727      0t0  TCP lmimmfn-dev:8585->100.120.44.137:52916 (ESTABLISHED)
node      667384 lmimmfn  77u  IPv6 197441728      0t0  TCP lmimmfn-dev:8585->100.120.44.137:52917 (ESTABLISHED)
node      667384 lmimmfn  78u  IPv6 197441730      0t0  TCP lmimmfn-dev:8585->100.120.44.137:52919 (ESTABLISHED)
node      667384 lmimmfn  79u  IPv6 197441729      0t0  TCP lmimmfn-dev:8585->100.120.44.137:52918 (ESTABLISHED)
node      667384 lmimmfn  80u  IPv6 197441731      0t0  TCP lmimmfn-dev:8585->100.120.44.137:52920 (ESTABLISHED)
node      667384 lmimmfn  81u  IPv6 197441732      0t0  TCP lmimmfn-dev:8585->100.120.44.137:52933 (ESTABLISHED)

Here i have web server ruinning on port 8585 and i have sessions open from 100.120.44.137, so you probably have the server running on port 443 so you can just pipe to grep for just those connections:
lsof -i | grep ":443->"

If you want just the connections you can | it to awk as connections are 9th column:
lsof -i | awk '{print $9}'

If you want just the list of connected incomming ip's you can use:
lsof -i | awk '{print $9}' | grep ":443->" | sed 's/.*->//'

Heres sample output filtering from the above example and on port 8585
lsof -i  | awk '{print $9}' | grep ":8585->" | sed 's/.*->//'
100.120.44.137:52915
100.120.44.137:52916
100.120.44.137:52917
100.120.44.137:52919
100.120.44.137:52918
100.120.44.137:52920
100.120.44.137:52933

You could crontab the above(running say every 5 minutes) to concatanate(use >> instead for > for concatenation) to a file e.g.(and dont use /tmp for your server, put it somewhere else) /tmp/ip_addresses.log
lsof -i  | awk '{print $9}' | grep ":443->" | sed 's/.*->//' >/tmp/ip_addresses.log

to add to crontab:
crontab -e
will open the crontab file for editing, add the line:
*/5 * * * * lsof -i  | awk '{print $9}' | grep ":443->" | sed 's/.*->//' >/tmp/ip_addresses.log
save it( escape then ":" then "wq"

Then to get the unique ones just :
cat /tmp/ip_addresses.log | sort | uniq

you can also aggregate the count of connections from the same ipaddress with:
cat /tmp/ip_addresses.log | sort | uniq -c


#28
avatar_HAL6128
Emulators / Re: CPCEmu v3.0 (April 2025)
Last post by HAL6128 - Yesterday at 12:24
By the way: would it be possible to expand the Debugger Monitor to an external window?
#29
E
News & Events / Re: Revision 2025 demoscene pa...
Last post by Egg Master - Yesterday at 12:10
Quote from: robcfg on 23:35, 24 April 25there's the issue of the data these models have been trained with. Specially all the images used without artists' permission
This is an argument we often hear, but it remains unfounded. Besides, all artists have been inspired by existing works to create their own style, and there is nothing illegal about that. As soon as we can see or hear something, it is copied into our memories.

Regarding the fact that what an AI does is not perfect... How to say, it's human nature.
#30
avatar_Gryzor
CPCWiki Discussion / Re: Need some linux help with ...
Last post by Gryzor - Yesterday at 11:19
Quote from: ajcasado on Yesterday at 11:08
Quote from: Gryzor on Yesterday at 10:59I'm not ikonsgr :D
Oops, my brain must've lagged harder than the server, apologies chief! :picard2: , anyway, glad I could help!

I haven't tried Perplexity yet, but the script it generated looks solid, definitely worth a shot.


I think the original script had an error (didn't try it, I edited it before running, maybe it was my idea and it was fine).

Perplexity is pretty nice actually,I found a pro subscription on the cheap and I use it for some research, really loving it. Their own llm is pretty good (though it offers others, too).

The only drawback compared to ChatGTP is it doesn't have long-term memory (I think only ChatGTP does?).
Powered by SMFPacks Menu Editor Mod