Re: "Cannot allocate memory" error when memory is enough

2018-07-08 Thread Stuart Henderson
On 2018/07/08 21:56, Nan Xiao wrote:
> Hi Stuart,
> 
> Thanks for your reply!
> 
> $ cat /etc/installurl
> https://ftp.openbsd.org/pub/OpenBSD
> 
> Does my /etc/installurl will always fetch -current?
> 
> Thanks in advance!
> Best Regards
> Nan Xiao
> 
> 
> On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson  wrote:
> > On 2018-07-07, Tom Smyth  wrote:
> >> Hi otto
> >>
> >> I must check that last time i read man page  it was related it was for
> >> syspatch
> >
> > /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/
> > etc depending on the kernel version string.
> >
> > If set, PKG_PATH overrides /etc/installurl, and this takes either a short
> > hostname (in which case the same rules apply for version string), or a
> > full path (either as a static string or with placeholders replaced by
> > arch/version).
> >
> > That is why I asked if PKG_PATH was set.
> >
> >

It depends on what kernel you are running.

$ sysctl -n kern.version | head -1
OpenBSD 6.3-current (GENERIC.MP) #6: Thu Jul  5 21:40:47 BST 2018

-> fetches -current packages

$ sysctl -n kern.version | head -1
OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018

-> fetches release packages

Also I would recommend against using ftp.openbsd.org, pick a local mirror
or if using releases one of the CDNs instead ..



Configuration of a umb device

2018-07-08 Thread salanimi
Could someone direct me as to how to set up my computer such that I can
get internet access through? I installed a this model of US Mobile SIM card.
https://www.usmobile.com/shop/product/Triple-Cut-GSM-SIM-Card

Then I ran the commands below. What do I need to do next?

$ dmesg|grep umb 
umb0 at uhub0 port 4 configuration 1 interface 6 "Lenovo N5321 gw" rev 
2.00/0.00 addr 2
$ ifconfig apn pwg pin 1234 class 2G roaming up
$ ifconfig
umb0: flags=8851 mtu 1500
index 5 priority 0 llprio 3
roaming enabled registration home network
state up cell-class EDGE rssi -77dBm speed 60.4Kps up 242Kps down
SIM initialized PIN valid (3 attempts left)
subscriber-id 310260855911295 ICC-id 8901260851159112954 provider US Mobile
device KRD 131 30/123 - R1A/1 IMEI 004401701565398 firmware R3C11 (Pro), R4A10 
(App)
APN pwg
dns 10.177.0.34 10.177.0.210
status: active
inet 100.144.58.19 --> 100.144.58.18 netmask 0xfff8
$ ping -c1 9.9.9.9
PING 9.9.9.9 (9.9.9.9): 56 data bytes
ping: sendmsg: No route to host
ping: wrote 9.9.9.9 64 chars, ret=-1

--- 9.9.9.9 ping statistics ---
1 packets transmitted, 0 packets received, 100.0% packet loss



Re: "Cannot allocate memory" error when memory is enough

2018-07-08 Thread Nan Xiao
Hi Stuart,

This is my kernel information:

$ sysctl -n kern.version | head -1
OpenBSD 6.3 (GENERIC.MP) #4: Sun Jun 17 11:22:20 CEST 2018

I remember I used to build -current code before. So is it possible
that will mess up my system?

Thanks!
Best Regards
Nan Xiao


On Sun, Jul 8, 2018 at 10:17 PM, Stuart Henderson  wrote:
> On 2018/07/08 21:56, Nan Xiao wrote:
>> Hi Stuart,
>>
>> Thanks for your reply!
>>
>> $ cat /etc/installurl
>> https://ftp.openbsd.org/pub/OpenBSD
>>
>> Does my /etc/installurl will always fetch -current?
>>
>> Thanks in advance!
>> Best Regards
>> Nan Xiao
>>
>>
>> On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson  
>> wrote:
>> > On 2018-07-07, Tom Smyth  wrote:
>> >> Hi otto
>> >>
>> >> I must check that last time i read man page  it was related it was for
>> >> syspatch
>> >
>> > /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/
>> > etc depending on the kernel version string.
>> >
>> > If set, PKG_PATH overrides /etc/installurl, and this takes either a short
>> > hostname (in which case the same rules apply for version string), or a
>> > full path (either as a static string or with placeholders replaced by
>> > arch/version).
>> >
>> > That is why I asked if PKG_PATH was set.
>> >
>> >
>
> It depends on what kernel you are running.
>
> $ sysctl -n kern.version | head -1
> OpenBSD 6.3-current (GENERIC.MP) #6: Thu Jul  5 21:40:47 BST 2018
>
> -> fetches -current packages
>
> $ sysctl -n kern.version | head -1
> OpenBSD 6.3 (GENERIC.MP) #107: Sat Mar 24 14:21:59 MDT 2018
>
> -> fetches release packages
>
> Also I would recommend against using ftp.openbsd.org, pick a local mirror
> or if using releases one of the CDNs instead ..
>



Re: %#ẍ Dev OS

2018-07-08 Thread Ywe Cærlyn

Den 7/8/2018 17:27, skrev Rudy Baker:
I have a suggestion for when you change the name of your OS again next 
week:


π√¶:*!!!flïbbīnflùbêñ OS;;;!?***

It just rolls right off the tongue


Rudy charming as usual ;)



Re: "Cannot allocate memory" error when memory is enough

2018-07-08 Thread Nan Xiao
Hi Stuart,

Thanks for your reply!

$ cat /etc/installurl
https://ftp.openbsd.org/pub/OpenBSD

Does my /etc/installurl will always fetch -current?

Thanks in advance!
Best Regards
Nan Xiao


On Sun, Jul 8, 2018 at 7:33 AM, Stuart Henderson  wrote:
> On 2018-07-07, Tom Smyth  wrote:
>> Hi otto
>>
>> I must check that last time i read man page  it was related it was for
>> syspatch
>
> /etc/installurl is used if present, pkg_add selects /snapshots/ or /6.3/
> etc depending on the kernel version string.
>
> If set, PKG_PATH overrides /etc/installurl, and this takes either a short
> hostname (in which case the same rules apply for version string), or a
> full path (either as a static string or with placeholders replaced by
> arch/version).
>
> That is why I asked if PKG_PATH was set.
>
>



%#ẍ Dev OS (was: Fair Pay In Cyberspace)

2018-07-08 Thread Ywe Cærlyn
We are now %#ẍ Dev,  a short form of the same intent, since so many 
already like three-letter concepts.


This is all going to be about the percentages people, and that is all an 
OS needs to be about.


With such a driving factor, in the business oriented computer world, we 
will have the "good os", the low jitter, and the smooth graphics.


Because it is all part of the same mindset.

Jinn and Hūman. Those of you who desire a good OS, our research is still 
at, https://nyt.cloud/showthread.php?tid=2


Now also with a suggestion for replacement of mp3. GNU does indeed not 
hide anything from The Gôdh.


Peace (Go With Théé),
Ywe Cærlyn.
Léad
%#ẍ Dev



Re: arm64 recommendation Pine64 or Rock64

2018-07-08 Thread Janne Johansson
Den sön 8 juli 2018 kl 07:04 skrev Predrag Punosevac :

>  I am in particularly keen on building an
> embedded computer which will use  Arduino UNO a microcontroller
> motherboard(s) to pool DHT22 AM2302 Digital Temperature And Humidity
> Measurement Sensor as well as HC-SR501 Human Sensor Module Pyroelectric
> Infrared. I see arduino-1.0.2p6v0.tgz among aarch64 packages so I am
> guessing somebody has already tried this. Any feed back on developing
> Arduino sketches from arm64 board?
>
>
I haven't tried it, but it should be doable.

Still, nothing prevents one from compiling the arduino hexes on another
machine and using avrdude on the arm64 to upload and later talk to the
Arduino if need be.
As for using openbsd (in my case on amd64) in general to develop arduino
stuff, it works great if you skip the IDE and use Makefiles to compile and
upload the code.

-- 
May the most significant bit of your life be positive.


cgi issues

2018-07-08 Thread Edgar Pettijohn III
I am playing around with cgi written in c. I am getting what seems like 
a weird error though. I'm starting off with a very basic program:


#include 

int
main(void)
{
    fprintf(stdout,
   "\n"
   "\n"
   "test\n"
   "\n"
   "\n"
   );

    fprintf(stdout, "it works\n");

    fprintf(
   stdout,
   "\n"
   "\n"
  );

    return (0);
}

I set up bgplg to make sure that httpd and slowcgi are working 
correctly. Here is the only debug info I could find.


doas httpd -dvv
startup
server_privinit: adding server default
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
server_launch: configuring server default
server_launch: running server default
server_launch: configuring server default
server_launch: configuring server default
server_launch: running server default
server_launch: running server default
default 127.0.0.1 - - [08/Jul/2018:07:45:51 -0500] "GET /cgi-bin/bgplg 
HTTP/1.1" 200 0
default 127.0.0.1 - - [08/Jul/2018:07:45:55 -0500] "GET /cgi-bin/test 
HTTP/1.1" 500 0
server default, client 1 (1 active), 127.0.0.1:46773 -> 127.0.0.1, empty 
stdout (500 Internal Server Error)


I'm not sure what `empty stdout' means.

Thanks,

Edgar



Re: cgi issues

2018-07-08 Thread Florian Obser
On Sun, Jul 08, 2018 at 07:53:41AM -0500, Edgar Pettijohn III wrote:
> I am playing around with cgi written in c. I am getting what seems like a
> weird error though. I'm starting off with a very basic program:
> 
> #include 
> 
> int
> main(void)
> {
>     fprintf(stdout,
>    "\n"
>    "\n"
>    "test\n"
>    "\n"
>    "\n"
>    );

you need to output a header, something like
printf("Status: 200 OK\r\nContent-Type: text/html\r\n\r\n");

you might also want to consider using kcgi (in ports)

https://kristaps.bsd.lv/kcgi/

> 
>     fprintf(stdout, "it works\n");
> 
>     fprintf(
>    stdout,
>    "\n"
>    "\n"
>   );
> 
>     return (0);
> }
> 
> I set up bgplg to make sure that httpd and slowcgi are working correctly.
> Here is the only debug info I could find.
> 
> doas httpd -dvv
> startup
> server_privinit: adding server default
> socket_rlimit: max open files 1024
> socket_rlimit: max open files 1024
> socket_rlimit: max open files 1024
> server_launch: configuring server default
> server_launch: running server default
> server_launch: configuring server default
> server_launch: configuring server default
> server_launch: running server default
> server_launch: running server default
> default 127.0.0.1 - - [08/Jul/2018:07:45:51 -0500] "GET /cgi-bin/bgplg
> HTTP/1.1" 200 0
> default 127.0.0.1 - - [08/Jul/2018:07:45:55 -0500] "GET /cgi-bin/test
> HTTP/1.1" 500 0
> server default, client 1 (1 active), 127.0.0.1:46773 -> 127.0.0.1, empty
> stdout (500 Internal Server Error)
> 
> I'm not sure what `empty stdout' means.
> 
> Thanks,
> 
> Edgar
> 

-- 
I'm not entirely sure you are real.



Re: cgi issues

2018-07-08 Thread Edgar Pettijohn III




On 07/08/18 08:09, Florian Obser wrote:

On Sun, Jul 08, 2018 at 07:53:41AM -0500, Edgar Pettijohn III wrote:

I am playing around with cgi written in c. I am getting what seems like a
weird error though. I'm starting off with a very basic program:

#include 

int
main(void)
{
     fprintf(stdout,
    "\n"
    "\n"
    "test\n"
    "\n"
    "\n"
    );

you need to output a header, something like
printf("Status: 200 OK\r\nContent-Type: text/html\r\n\r\n");


still the same results


you might also want to consider using kcgi (in ports)

https://kristaps.bsd.lv/kcgi/

I'll look into it.

thanks

     fprintf(stdout, "it works\n");

     fprintf(
    stdout,
    "\n"
    "\n"
   );

     return (0);
}

I set up bgplg to make sure that httpd and slowcgi are working correctly.
Here is the only debug info I could find.

doas httpd -dvv
startup
server_privinit: adding server default
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
server_launch: configuring server default
server_launch: running server default
server_launch: configuring server default
server_launch: configuring server default
server_launch: running server default
server_launch: running server default
default 127.0.0.1 - - [08/Jul/2018:07:45:51 -0500] "GET /cgi-bin/bgplg
HTTP/1.1" 200 0
default 127.0.0.1 - - [08/Jul/2018:07:45:55 -0500] "GET /cgi-bin/test
HTTP/1.1" 500 0
server default, client 1 (1 active), 127.0.0.1:46773 -> 127.0.0.1, empty
stdout (500 Internal Server Error)

I'm not sure what `empty stdout' means.

Thanks,

Edgar





Re: cgi issues

2018-07-08 Thread Florian Obser
On Sun, Jul 08, 2018 at 08:30:29AM -0500, Edgar Pettijohn III wrote:
> 
> 
> On 07/08/18 08:09, Florian Obser wrote:
> > On Sun, Jul 08, 2018 at 07:53:41AM -0500, Edgar Pettijohn III wrote:
> > > I am playing around with cgi written in c. I am getting what seems like a
> > > weird error though. I'm starting off with a very basic program:
> > > 
> > > #include 
> > > 
> > > int
> > > main(void)
> > > {
> > >      fprintf(stdout,
> > >     "\n"
> > >     "\n"
> > >     "test\n"
> > >     "\n"
> > >     "\n"
> > >     );
> > you need to output a header, something like
> > printf("Status: 200 OK\r\nContent-Type: text/html\r\n\r\n");
> 
> still the same results

next guess, you are not building a static binary.

this might tell you what goes wrong:
doas chroot -u www /var/www/ /cgi-bin/test

alternatively stop slowcgi and start it in debug mode,
that might tell you things

> > 
> > you might also want to consider using kcgi (in ports)
> > 
> > https://kristaps.bsd.lv/kcgi/
> I'll look into it.
> 
> thanks
> > >      fprintf(stdout, "it works\n");
> > > 
> > >      fprintf(
> > >     stdout,
> > >     "\n"
> > >     "\n"
> > >    );
> > > 
> > >      return (0);
> > > }
> > > 
> > > I set up bgplg to make sure that httpd and slowcgi are working correctly.
> > > Here is the only debug info I could find.
> > > 
> > > doas httpd -dvv
> > > startup
> > > server_privinit: adding server default
> > > socket_rlimit: max open files 1024
> > > socket_rlimit: max open files 1024
> > > socket_rlimit: max open files 1024
> > > server_launch: configuring server default
> > > server_launch: running server default
> > > server_launch: configuring server default
> > > server_launch: configuring server default
> > > server_launch: running server default
> > > server_launch: running server default
> > > default 127.0.0.1 - - [08/Jul/2018:07:45:51 -0500] "GET /cgi-bin/bgplg
> > > HTTP/1.1" 200 0
> > > default 127.0.0.1 - - [08/Jul/2018:07:45:55 -0500] "GET /cgi-bin/test
> > > HTTP/1.1" 500 0
> > > server default, client 1 (1 active), 127.0.0.1:46773 -> 127.0.0.1, empty
> > > stdout (500 Internal Server Error)
> > > 
> > > I'm not sure what `empty stdout' means.
> > > 
> > > Thanks,
> > > 
> > > Edgar
> > > 
> 

-- 
I'm not entirely sure you are real.



Re: %#ẍ Dev OS (was: Fair Pay In Cyberspace)

2018-07-08 Thread Rudy Baker
I have a suggestion for when you change the name of your OS again next
week:

π√¶:*!!!flïbbīnflùbêñ OS;;;!?***

It just rolls right off the tongue

On Sun, Jul 8, 2018, 6:59 AM Ywe Cærlyn,  wrote:

> We are now %#ẍ Dev,  a short form of the same intent, since so many
> already like three-letter concepts.
>
> This is all going to be about the percentages people, and that is all an
> OS needs to be about.
>
> With such a driving factor, in the business oriented computer world, we
> will have the "good os", the low jitter, and the smooth graphics.
>
> Because it is all part of the same mindset.
>
> Jinn and Hūman. Those of you who desire a good OS, our research is still
> at, https://nyt.cloud/showthread.php?tid=2
>
> Now also with a suggestion for replacement of mp3. GNU does indeed not
> hide anything from The Gôdh.
>
> Peace (Go With Théé),
> Ywe Cærlyn.
> Léad
> %#ẍ Dev
>
>


Re: cgi issues

2018-07-08 Thread Edgar Pettijohn III




On 07/08/18 08:41, Florian Obser wrote:

On Sun, Jul 08, 2018 at 08:30:29AM -0500, Edgar Pettijohn III wrote:


On 07/08/18 08:09, Florian Obser wrote:

On Sun, Jul 08, 2018 at 07:53:41AM -0500, Edgar Pettijohn III wrote:

I am playing around with cgi written in c. I am getting what seems like a
weird error though. I'm starting off with a very basic program:

#include 

int
main(void)
{
      fprintf(stdout,
     "\n"
     "\n"
     "test\n"
     "\n"
     "\n"
     );

you need to output a header, something like
printf("Status: 200 OK\r\nContent-Type: text/html\r\n\r\n");

still the same results

next guess, you are not building a static binary.
We have a winner.  Thanks for the help.  Including compile commands to 
help anyone who may come across this thread.


cc -c -o test.o test.c
cc -o test -static test.o


this might tell you what goes wrong:
doas chroot -u www /var/www/ /cgi-bin/test

alternatively stop slowcgi and start it in debug mode,
that might tell you things


you might also want to consider using kcgi (in ports)

https://kristaps.bsd.lv/kcgi/

I'll look into it.

thanks

      fprintf(stdout, "it works\n");

      fprintf(
     stdout,
     "\n"
     "\n"
    );

      return (0);
}

I set up bgplg to make sure that httpd and slowcgi are working correctly.
Here is the only debug info I could find.

doas httpd -dvv
startup
server_privinit: adding server default
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
server_launch: configuring server default
server_launch: running server default
server_launch: configuring server default
server_launch: configuring server default
server_launch: running server default
server_launch: running server default
default 127.0.0.1 - - [08/Jul/2018:07:45:51 -0500] "GET /cgi-bin/bgplg
HTTP/1.1" 200 0
default 127.0.0.1 - - [08/Jul/2018:07:45:55 -0500] "GET /cgi-bin/test
HTTP/1.1" 500 0
server default, client 1 (1 active), 127.0.0.1:46773 -> 127.0.0.1, empty
stdout (500 Internal Server Error)

I'm not sure what `empty stdout' means.

Thanks,

Edgar