Re: cron jobs not running after upgrade from 8.0/1 to 9.1

2020-12-31 Thread John Nemeth
On Jan 1,  8:16, Mayuresh wrote:
} On Thu, Dec 31, 2020 at 05:12:23PM -0800, John Nemeth wrote:
} >  If you use sysinst to update the system, which is the officially
} > supported way to do it, then sysinst will automatically run
} > postinstall at the end of the process which would have solved this
} > problem.  If you don't use sysinst, then you really need to know
} > a lot more about how everything works.
} 
} What would it do with etc? Does it invoke etcupdate giving a chance to

  As I said, it runs postinstall (man postinstall).

}-- End of excerpt from Mayuresh


Re: Any package to populate image from raw data?

2020-12-31 Thread Mayuresh
On Fri, Jan 01, 2021 at 12:34:36AM +0530, Mayuresh wrote:
> On Thu, Dec 31, 2020 at 06:17:13PM -, Michael van Elst wrote:
> > 16bit/pixel is rare. Maybe pi-fits can do what you need, it's made
> > for astronomy pictures.
> 
> May be medical imaging (X rays in this case) use 16bit, just like
> astronomy. I came across pypng which is supporting 16 bit depth.

Correction. It turns out the 16 bits for dark area are ff0f indicating the
device is actually 12bit with the data having a 4 bit filler.

Thanks for all the replies. I used pypng finally which supports 12 (and
also 16) bit depth. Being in python it integrates directly with my pyusb
based driver.

[Writing a driver solved a major dependency that forced the use of
VirtualBox, Windows XP and a node locked license to a proprietary software
which meant even if I merely changed the VM I'd need to pay license fees
to get it to work.]

-- 
Mayuresh


Re: cron jobs not running after upgrade from 8.0/1 to 9.1

2020-12-31 Thread Mayuresh
On Thu, Dec 31, 2020 at 05:12:23PM -0800, John Nemeth wrote:
>  If you use sysinst to update the system, which is the officially
> supported way to do it, then sysinst will automatically run
> postinstall at the end of the process which would have solved this
> problem.  If you don't use sysinst, then you really need to know
> a lot more about how everything works.

What would it do with etc? Does it invoke etcupdate giving a chance to
retain/review/merge etc? I feel that kind of an interactive operation
should rather be done when the installation is over and system is up,
rather than during installation.

-- 
Mayuresh


Re: cron jobs not running after upgrade from 8.0/1 to 9.1

2020-12-31 Thread John Nemeth
On Dec 31, 18:58, Mayuresh wrote:
} On Thu, Dec 31, 2020 at 06:44:17AM -, Michael van Elst wrote:
} > If you use the -a option, files that weren't modified locally will be
} > changed without prompting. Otherwise you should have seen a confirmation
} > prompt.
} 
} I didn't use -a. Must be then my bad of not noticing it. Let's leave it
} then.
} 
} Importantly I got to learn about etcupdate and also the issue got solved.
} Thanks for your prompt hint.

 If you use sysinst to update the system, which is the officially
supported way to do it, then sysinst will automatically run
postinstall at the end of the process which would have solved this
problem.  If you don't use sysinst, then you really need to know
a lot more about how everything works.

}-- End of excerpt from Mayuresh


Re: Any package to populate image from raw data?

2020-12-31 Thread Benny Siegert
You can build something with the Go image package quite easily. Create an
image in memory and fill it with raw values, then write to an image format
of your choice. If you prefer C++, OpenCV can do this too.

Mayuresh  schrieb am Do. 31. Dez. 2020 um 17:54:

> I recently wrote a pyusb based driver to interact with an X ray camera.
> The driver gives me a byte array of a 16 bit grayscale image. I want to
> put this byte array into an image format. No specific format required as I
> can always convert it using ImageMagick.
>
> [The python pillow package almost did the job except for one glitch. This
> data is 16 bit grayscale data and pillow is able to handle only 8 bit data
> i.e. the image gets formed fine, but gets saved only with 8 bit depth. Saw
> posts somewhere saying that this is a limitation with pillow.]
>
> Looking for alternative to pillow to create image from byte array,
> preferably pkgsrc based, but otherwise is also fine. Python based
> preferably as the driver is in python, but otherwise is also fine.
>
> --
> Mayuresh
>
-- 
Benny


Re: Any package to populate image from raw data?

2020-12-31 Thread David Brownlee
On Thu, 31 Dec 2020 at 16:54, Mayuresh  wrote:
>
> I recently wrote a pyusb based driver to interact with an X ray camera.
> The driver gives me a byte array of a 16 bit grayscale image. I want to
> put this byte array into an image format. No specific format required as I
> can always convert it using ImageMagick.
>
> [The python pillow package almost did the job except for one glitch. This
> data is 16 bit grayscale data and pillow is able to handle only 8 bit data
> i.e. the image gets formed fine, but gets saved only with 8 bit depth. Saw
> posts somewhere saying that this is a limitation with pillow.]
>
> Looking for alternative to pillow to create image from byte array,
> preferably pkgsrc based, but otherwise is also fine. Python based
> preferably as the driver is in python, but otherwise is also fine.

Maybe https://pypi.org/project/tifffile/ - TIFF has supported 16bpp
for the last few decades :-p

David


Re: Any package to populate image from raw data?

2020-12-31 Thread Martin Neitzel
Hi Mayuresh,

> I recently wrote a pyusb based driver to interact with an X ray camera.
> The driver gives me a byte array of a 16 bit grayscale image. I want to
> put this byte array into an image format. No specific format required as I
> can always convert it using ImageMagick.

I always do this kind of stuff with Jeff Poskanzer's PBM tools.
The the pksrc name for the whole toolkit is "netpbm".

In this case, rawtopgm(1) would probably your first step of a command
pipeline, finishing with any of the pgmto... or pnmto... tools to create
your target format; optionally with some transformations wegded in
in between.

HNY, Martin Neitzel

NAME
   rawtopgm - convert raw grayscale bytes into a portable graymap

SYNOPSIS
   rawtopgm  [-bpp  [1|2]]  [-littleendian]  [-maxval  N]  [-headerskip N]
   [-rowskip N] [-tb|-topbottom] [width height] [imagefile]

DESCRIPTION
   Reads raw grayscale values as input.  Produces a PGM  file  as  output.
   The input file is just a sequence of pure binary numbers, either one or
   two bytes each, either bigendian  or  littleendian,  representing  gray
   values.   They  may  be arranged either top to bottom, left to right or
   bottom to top, left to right.  There may be arbitrary  header  informa‐
   tion  at  the start of the file (to which rawtopgm pays no attention at
   all other than the header's size).


Re: Any package to populate image from raw data?

2020-12-31 Thread Mayuresh
On Thu, Dec 31, 2020 at 06:17:13PM -, Michael van Elst wrote:
> 16bit/pixel is rare. Maybe pi-fits can do what you need, it's made
> for astronomy pictures.

May be medical imaging (X rays in this case) use 16bit, just like
astronomy. I came across pypng which is supporting 16 bit depth.

-- 
Mayuresh


Re: Any package to populate image from raw data?

2020-12-31 Thread Michael van Elst
mayur...@acm.org (Mayuresh) writes:

>Looking for alternative to pillow to create image from byte array,
>preferably pkgsrc based, but otherwise is also fine. Python based
>preferably as the driver is in python, but otherwise is also fine.

16bit/pixel is rare. Maybe pi-fits can do what you need, it's made
for astronomy pictures.

-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


Any package to populate image from raw data?

2020-12-31 Thread Mayuresh
I recently wrote a pyusb based driver to interact with an X ray camera.
The driver gives me a byte array of a 16 bit grayscale image. I want to
put this byte array into an image format. No specific format required as I
can always convert it using ImageMagick.

[The python pillow package almost did the job except for one glitch. This
data is 16 bit grayscale data and pillow is able to handle only 8 bit data
i.e. the image gets formed fine, but gets saved only with 8 bit depth. Saw
posts somewhere saying that this is a limitation with pillow.]

Looking for alternative to pillow to create image from byte array,
preferably pkgsrc based, but otherwise is also fine. Python based
preferably as the driver is in python, but otherwise is also fine.

-- 
Mayuresh


Re: cron jobs not running after upgrade from 8.0/1 to 9.1

2020-12-31 Thread Mayuresh
On Thu, Dec 31, 2020 at 06:44:17AM -, Michael van Elst wrote:
> If you use the -a option, files that weren't modified locally will be
> changed without prompting. Otherwise you should have seen a confirmation
> prompt.

I didn't use -a. Must be then my bad of not noticing it. Let's leave it
then.

Importantly I got to learn about etcupdate and also the issue got solved.
Thanks for your prompt hint.

-- 
Mayuresh



Re: RAIDframe write performance below expectations on a RAID-1 of two magnetic disks on NetBSD/amd64 9.1

2020-12-31 Thread Matthias Petermann

Hello all,

in the meantime a few days have passed and after some back and forth I 
have now found a parameterization in which my RAID-1 achieves very 
satisfactory throughput rates (ca. 90 MB/s and more). I still can't 
completely exclude that the hardware has a small damage, because I think 
that I had tested the current configuration also at the beginning, then 
with worse results. Anyway - for the sake of completeness, here is a 
short summary of what finally led to success. And of course thanks again 
for all the hints here in the mailing list - that was a big help.


By the way: I have read in many places - including RAIDCTL(8) - that it 
is not safe to create a partition or filesystem on the RAID device until 
initialization with "-i" is 100% complete. If someone has a link to a 
documentation that goes into this in more detail, I would be very 
interested. Especially because I would like to understand what exactly 
is so dangerous about it and under which circumstances - if any - 
certain operations may be performed already during initialization. I 
also think that it would be enough for me to know what exactly happens 
on block level at -i. For the understanding of the source code I lack 
the experience, and the very good paper under


https://www.pdl.cmu.edu/RAIDframe/raidframebook.pdf

does not seem to address this.

Kind regards
Matthias


1) Create 4k aligned partitions

```
# gpt destroy wd2
# gpt destroy wd3
# gpt create wd2
# gpt create wd3
# gpt add -l raid1cmp0 -a 4k -t raid wd2
# gpt add -l raid1cmp1 -a 4k -t raid wd3
```

2) Create RAIDframe configuration file

```
# cat < /tmp/raid1.conf
START array
1 2 0

START disks
NAME=raid1cmp0
NAME=raid1cmp1

START layout
128 1 1 1

START queue
fifo 100
EOF
```

3) Initialize RAID

```
# raidctl -C /tmp/raid1.conf raid1
# raidctl -I 2020122802 raid1
# raidctl -i raid1
# raidctl -A yes raid1
```

4) After reconstruction / parity-rewrite has finished: create partition 
on RAID and format filesystem


```
# gpt create raid1
# gpt add -l data -a 4k -t ffs raid1
# newfs -O 2 NAME=data
```



RE: [External Email] parallel computing with netbsd?

2020-12-31 Thread Adam Russell
Thank you ! I am familiar with MPI and I think it is the PVM information that I 
am most interested in for right now.

From: netbsd-users-ow...@netbsd.org  On Behalf 
Of Andrew Ball
Sent: Tuesday, December 29, 2020 5:51 PM
To: Netbsd-users 
Subject: Fwd: [External Email] parallel computing with netbsd?

Package  pkgsrc     current  URL
OpenMPI  1.10.7nb5  4.1.0    https://www.open-mpi.org/
MPICH    3.2.1nb4   3.3.2    https://www.mpich.org/
PVM      3.4.6nb2   3.4.6    https://www.csm.ornl.gov/pvm/pvm_home.html

-- Forwarded message -
From: Andrew Ball 
Date: Tue, Dec 29, 2020 at 3:19 PM
Subject: Re: [External Email] parallel computing with netbsd?
To: Adam Russell 

Hello Adam,

There are some related tools in pkgsrc/parallel, though I'm not sure how fresh 
they are. Ones that jump out at me are OpenMPI and mpich. I also see PVM in 
there.

-Andy Ball

http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/parallel/README.html

On Tue, Dec 29, 2020 at 2:31 PM Adam Russell  wrote:
I am looking for some instructions on how to have multiple NetBSD systems work 
in parallel. I recall a bunch of years ago there was at least one decent 
writeup on Beowulf systems using netbsd but cannot fine it anymore. Anyone have 
any suggested links and readings on this subject?