Go to advanced search

by swampdog
Sat Sep 07, 2019 11:24 am
Forum: General discussion
Topic: Dual redundancy raspberry PI
Replies: 14
Views: 619

Re: Dual redundancy raspberry PI

I have an rpi zero which monitors a power clamp on our fuse box. It's failed for the third time. Kudos to the guy who wrote the code but I knew it would go belly up but have been constantly too lazy to do anything about it. The code writes to a sqlite database which wears out the cards. I should hav...
by swampdog
Sat Sep 07, 2019 2:32 am
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5206

Re: Looking for advice with C++ learning

Really (really) terse example.. #include <iostream> using std::cout; typedef unsigned char TINYINT; typedef unsigned int BIGGERINT; struct foo { TINYINT a; foo(TINYINT b) : a(b){} foo operator+(foo & b) {TINYINT r(a+b.a); BIGGERINT aa(a+b.a); if (aa!=r) cout<<"oops\n"; return r; } }; int main() {foo...
by swampdog
Sat Sep 07, 2019 1:53 am
Forum: Troubleshooting
Topic: Pi 4, rootfs on SSD goes readonly
Replies: 19
Views: 1021

Re: Pi 4, rootfs on SSD goes readonly

Hi Folks, Another update. Put this https://www.amazon.co.uk/gp/product/B077SF8KMG/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1 into this https://www.amazon.co.uk/gp/product/B01K7I7UGQ/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1 and no data corruption so far. For cooling I tried this https:/...
by swampdog
Wed Aug 28, 2019 9:04 pm
Forum: Beginners
Topic: I cannot SSH my pi anymore
Replies: 20
Views: 498

Re: I cannot SSH my pi anymore

dpkg: warning: files list file for package 'node-brace-expansion' missing; assuming package has no files currently installed [snip] ^^^corruption. Your best bet at this point is to attempt to rescue what work you can. This will make it far worse unless you can guarantee your sdcard is 100% ok.. htt...
by swampdog
Wed Aug 28, 2019 6:39 pm
Forum: Beginners
Topic: I cannot SSH my pi anymore
Replies: 20
Views: 498

Re: I cannot SSH my pi anymore

privsep_preauth: preauth child terminated by signal 11 Hmm. This is a guess based on some googling. Assuming you're happy your sdcard is okay then.. $ sudo apt-get update $ sudo apt-get upgrade ..(because the last update may be incomplete) making sure there's no warnings/errors. If there are warnin...
by swampdog
Wed Aug 28, 2019 5:25 pm
Forum: Beginners
Topic: I cannot SSH my pi anymore
Replies: 20
Views: 498

Re: I cannot SSH my pi anymore

pi@RPiPerpignan:~ $ sudo /usr/sbin/sshd -d [sudo] password for pi: debug1: sshd version OpenSSH_7.4, OpenSSL 1.0.2l 25 May 2017 debug1: private host key #0: ssh-rsa S debug1: private host key #1: ecdsa-sha2g debug1: private host key #2: ssh-ed25U debug1: rexec_argv[0]='/usr/sbin/sshd' debug1: rexec...
by swampdog
Wed Aug 28, 2019 5:03 pm
Forum: Beginners
Topic: I cannot SSH my pi anymore
Replies: 20
Views: 498

Re: I cannot SSH my pi anymore

How can I add file ? it always throughs me " Error Invalid file extension: syslog" Ah. This is going to be tricky! I meant for you to search in "/var/log/syslog" for any errors. admin@pi05:~ $ sudo egrep -i ssh /var/log/syslog Aug 28 16:44:29 pi05 systemd[1]: Started Turn on SSH if /boot/ssh is pre...
by swampdog
Wed Aug 28, 2019 4:29 pm
Forum: Beginners
Topic: I cannot SSH my pi anymore
Replies: 20
Views: 498

Re: I cannot SSH my pi anymore

pi@RPiPerpignan:~ $ systemctl status ssh.service ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled) Active: failed (Result: signal) since Wed 2019-08-28 15:49:05 UTC; 15s ago Process: 1000 ExecStartPre=/usr/sbin/sshd -t (cod...
by swampdog
Sun Aug 25, 2019 5:42 pm
Forum: Troubleshooting
Topic: Pi 4, rootfs on SSD goes readonly
Replies: 19
Views: 1021

Re: Pi 4, rootfs on SSD goes readonly

@rpdom, That looks like an avenue worth pursuing. It'll have to wait a month though. I missed out on getting my second Pi4 as I wasn't here when the email arrived. I've backordered it this time. My "arc" backup server has failed so the current Pi4 has been pushed into service to do the job. I've fud...
by swampdog
Sun Aug 18, 2019 1:18 am
Forum: C/C++
Topic: Looking for advice with C++ learning
Replies: 29
Views: 5206

Re: Looking for advice with C++ learning

@DarkElvenAngel https://en.cppreference.com/ C++ is a horribly complex language. Professors would have you know all of it then argue about the definition of a pointer. However, your printf() is prone to buffer overflow whereas a "cout" is not. int i string s cout<<i<<s ..works in C++ even if you cha...
by swampdog
Sat Aug 17, 2019 11:10 pm
Forum: Beginners
Topic: ssd compatibility
Replies: 7
Views: 508

Re: ssd compatibility

Been away longer than expected! When plugging/unplugging stuff it's helpful to open a terminal and type this.. $ sudo tail -f /var/log/syslog Loads of other stuff may be going on (kinda like the windows event log) but unlike that system "-f" is like "follow" so as soon as something writes into the l...
by swampdog
Sat Aug 17, 2019 10:59 pm
Forum: Troubleshooting
Topic: Pi 4, rootfs on SSD goes readonly
Replies: 19
Views: 1021

Re: Pi 4, rootfs on SSD goes readonly

Hi Folks, Unfortunately the stats I hoped to gather are now useless. Too much has changed. While I was away (longer than I thought) the gcc stress test failed because of a duff network connection downloading gmp-6.1.0 for gcc 7.4.0. I logged in remotely during the week and restarted it from scratch ...
by swampdog
Thu Aug 08, 2019 10:00 pm
Forum: Beginners
Topic: ssd compatibility
Replies: 7
Views: 508

Re: ssd compatibility

Start at the beginning of this thread to see how complex it might get.. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=247833&p=1515778#p1515778 Generally speaking, anything (filesystem-wise) ubuntu can see, the pi can also - ie: ext2,3,4. I haven't tried xfs,btrfs,zfs on the pi (nor encryp...
by swampdog
Thu Aug 08, 2019 9:30 pm
Forum: Beginners
Topic: mounted external Hard Drive is not spinning
Replies: 8
Views: 333

Re: mounted external Hard Drive is not spinning

There needs to be some enforcement of standards in the usb/external area of computing. I have.. 3 esata caddies. 6 usb caddies. 4 unpowered usb/sata adapters. ..where one of the above is a dual usb/esata caddy. Two of the esata caddies work (on PC) as designed. The dual usb3/esata caddy does not wor...
by swampdog
Thu Aug 08, 2019 8:45 pm
Forum: Beginners
Topic: ssd compatibility
Replies: 7
Views: 508

Re: ssd compatibility

Perhaps the OP needs to start again. I'm getting M2.PCI for a google on "Samsung 970PRO".

To the OP, theoretically, yes. I've been exchanging an ssd between a Pi4 and linux mint all week.
by swampdog
Thu Aug 08, 2019 8:30 pm
Forum: General discussion
Topic: connection doens't return after router reboot
Replies: 9
Views: 321

Re: connection doens't return after router reboot

Here's a pi configured to pass everything through the machine 192.168.1.1 .. admin@pi05:~ $ netstat -anr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255...
by swampdog
Thu Aug 08, 2019 7:24 pm
Forum: Troubleshooting
Topic: Pi 4, rootfs on SSD goes readonly
Replies: 19
Views: 1021

Re: Pi 4, rootfs on SSD goes readonly

Hi Folks, (partial update) I've now tried four unpowered adapters, none successful. The only joy so far is with a powered caddy. I've set off the Pi4 building gcc 6,7,8,9 (full with tests) so it'll be busy for a while. In the meantime I'm gathering stats. Is there anything I ought to add to this? #!...
by swampdog
Wed Aug 07, 2019 4:16 pm
Forum: Troubleshooting
Topic: rsync - works from terminal but not as cron???
Replies: 33
Views: 805

Re: rsync - works from terminal but not as cron???

My bad. As DougieLawson says, I missed a slash.. $ scp .ssh/id_rsa.pub pj@10.1.1.155:~/.ssh/z identity_sign: private key /home/pj/.ssh/id_rsa contents do not match public I suspect you've overwritten one keypair with part of the other. FYI.. there's a private key (id_rsa) and a public key (id_rsa.pu...
by swampdog
Mon Aug 05, 2019 10:46 pm
Forum: Troubleshooting
Topic: Pi 4, rootfs on SSD goes readonly
Replies: 19
Views: 1021

Re: Pi 4, rootfs on SSD goes readonly

Hi Folks, Thanks all for the useful information. I dug out some powered usb/sata caddies and some old laptop hdd's. It is panning out to be the adapter+ssd combo. Not entirely certain yet: I spent so much time on it that I want to explore every avenue. I'll post proper results later. Essentially, ev...
by swampdog
Mon Aug 05, 2019 12:16 am
Forum: Troubleshooting
Topic: Pi 4, rootfs on SSD goes readonly
Replies: 19
Views: 1021

Re: Pi 4, rootfs on SSD goes readonly

Ah, looks like I was a bit unclear. Tired. Originally, it was a standard configuration. Installed to an 8G sdcard. The next operation was simply to format the SSD (gpt,64G, ext4) then rsync /dev/mmcblk0p2 onto /dev/sda1 (the SSD), mounted as /mnt/tmp/ then adjust /boot/cmdline.txt and /mnt/tmp/etc/f...
by swampdog
Sun Aug 04, 2019 10:10 pm
Forum: Troubleshooting
Topic: Pi 4, rootfs on SSD goes readonly
Replies: 19
Views: 1021

Pi 4, rootfs on SSD goes readonly

Hi Folks, Just wanted to reach out to see if anyone else if having this issue. I've spent the day doing all manner of tests for little result. Only errors to be had are on the console. My phone is a pig for not focusing on displays. "ext4_find_entry:1442: inode N" (various values for N) which I thin...
by swampdog
Fri Aug 02, 2019 11:27 am
Forum: C/C++
Topic: Program Latency
Replies: 1
Views: 1860

Re: Program Latency

I'm afraid, even with the source given, it is nigh on impossible to follow what is going on, certainly for me because I haven't done any gpio stuff yet. With that caveat in mind.. I can't see the mechanism for accessing what may be common variables across threads - ie: a mutex (except possibly globa...
by swampdog
Thu Aug 01, 2019 8:08 am
Forum: C/C++
Topic: compile Linux C programs to use cpu cores exclusively
Replies: 26
Views: 3618

Re: compile Linux C programs to use cpu cores exclusively

The magic word in this case is "affinity".. admin@pi05:~ $ apropos affinity pthread_attr_getaffinity_np (3) - set/get CPU affinity attribute in thread at... pthread_attr_setaffinity_np (3) - set/get CPU affinity attribute in thread at... pthread_getaffinity_np (3) - set/get CPU affinity of a thread ...
by swampdog
Tue Jul 30, 2019 4:43 pm
Forum: C/C++
Topic: Compiling Canon printer driver?
Replies: 3
Views: 292

Re: Compiling Canon printer driver?

Grgh! Libtool! Had no end of problems with that over the years! I'm not going to fix the build but you can link it manually.. Run your "make gen" then once it fails.. $ pwd /wrk/linux-UFRIILT-drv-v150-uken/Sources/cndrvcups-common-3.90/cngplp/src gcc -o cngplp main.o mainwnd.o printerinfo.o load.o o...
by swampdog
Tue Jul 30, 2019 1:07 pm
Forum: C/C++
Topic: StdLib Dirty Replacement Functions:
Replies: 20
Views: 977

Re: StdLib Dirty Replacement Functions:

@jahboater You can build GCC for a specific language, I have never tried it, but I think you can just do "--enable-languages=c" and get a C only compiler that should be a lot smaller. I typically use.. --enable-languages=c,c++ ..as it's rare I need anything else. For a fast build (mainly to see if ...

Go to advanced search