2,022 questions
0
votes
0
answers
43
views
FreeBSD Jail Run .NET Application on Startup
I have just built a new NAS running TrueNAS Core, the main use of it is for storage but as a side task I wanted it to run my Discord bot written in .NET8.0 (C#).
TrueNAS Core jails use FreeBSD and I ...
1
vote
0
answers
32
views
Node Memory SReclaimable Bytes Equivalent on FreeBSD
I am on a FreeBSD machine, and am trying to get some basic metrics from prometheus about my memory usage. I'm new to this however and cannot find great references online. I was the equivalent metric ...
0
votes
1
answer
80
views
Implementing a rc script to launch a custom service
I have a proprietary service inside a FreeBSD 14 jail that I launch as follows:
/opt/bin/rserver_tcp >> /var/log/rserver_tcp.log 2>&1
This is a blocking service which uses stdout and ...
1
vote
0
answers
178
views
How to directly access BCM2835 registers in C programming for GPIO control on a Raspberry Pi running FreeBSD 14.2
I am trying to control GPIO pins of a Raspberry Pi 3/4 running FreeBSD, using direct access to the BCM2835 registers. My code is based on Mike McCauley's C library.
It works fine on Linux (Raspberry ...
1
vote
0
answers
67
views
Can't configure Prisma engine on FreeBSD v14
I'm confused with running Prisma on a production server with FreeBSD v14
To compile the engine I ran
curl -sSf https://raw.githubusercontent.com/gek64/prisma-engines-freebsd/main/build-prisma-engines....
5
votes
5
answers
257
views
How can you use awk to replace a pattern with an environment variable?
I am trying to write a simple script that will receive a text via standard input and will output everything as it is except it will replace occurences following this pattern:
{{env MYVAR}}
{{env PATH}...
2
votes
1
answer
89
views
How to find the library paths for the running process?
I'm trying to create a capsicum sandbox to load plugins. Most of the setup is ready and working:
Create communication pipes.
fork().
From child:
Close unneeded resources.
cap_enter().
fdlopen().
...
2
votes
1
answer
155
views
FreeBSD - Find child processes from parent pid in C
This question is specifically for freeBSD.
Is there an OS function I can call in C to get child processes from a parent's process id (pid)?
I'm looking for exactly what pgrep -P <PID> does.
I've ...
0
votes
1
answer
83
views
Why are digits as option "letters" considered "wrong" for getopt(3) on BSD and macOS? [closed]
In getopt(3) on both FreeBSD and macOS, it states (emphasis mine):
It is also possible to handle digits as option letters. This allows getopt() to be used with programs that expect a number ("-...
0
votes
1
answer
167
views
How to format the creation timestamp of a ZFS snapshot with TrueNAS? [closed]
I would like to know the precise creation time of a ZFS snapshot. Note that I am not referring to the timestamp in the snapshot name itself but the result of querying the creation property when using ...
0
votes
1
answer
142
views
Does FreeBSD have copyfile()/fcopyfile()? If so, where can the documentation be found?
This StackOverflow answer How can I copy a file on Unix using C? claims that FreeBSD has copyfile()/fcopyfile() and has recieved 27 upvotes.
But FreeBSD Manual Pages found nothing for either copyfile()...
0
votes
0
answers
98
views
Freebsd: devd.conf, how can I find the proper matches?
Anyone know where or how to find the needed matches for an automation inside devd.conf? I am trying to run a script when the pppoe goes down.
This is what I have till now:
Code:
# Notify WAN 1 Down
...
0
votes
1
answer
325
views
Invalid regular expression 'Trailing backslash' error on FreeBSD
I'm trying to use sed on a file.
My command is as follows:
sed -e 's/\-.*\ \ET/ ET/g'
This works fine on Debian but on FreeBSD I am getting the following error:
sed: 1: "s/\-.*\ \ET/ ET/g ":...
0
votes
1
answer
813
views
set: Illegal option -o pipefail while running make
I'm running FreeBSD 10.4-RELEASE and can't upgrade it at the moment. Previously, 'make' was working fine, but recently I've been getting this error-
$ sudo make install
set: Illegal option -o pipefail
...
0
votes
0
answers
32
views
Issues while using a loop on a bash script [duplicate]
I am using mkvdts2ac3.sh script (see https://github.com/JakeWharton/mkvdts2ac3), and I have troubles to use it in a loop. This script is able to extract a dts track from a mkv file, convert it in AC3 ...
-2
votes
1
answer
142
views
How can I switch from clang11 to clang14 on freebsd?
hello on my server clang 11.0.1 version is installed but my project is compiled with clang14, when I write the command " pkg install clang14 " I get an error like clang14 not found.
please ...
0
votes
2
answers
138
views
FreeBSD 14.0, Ruby on Rails deployment issues (gem sqlite3 not installing)
I'm trying to deploy rails in FreeBSD 14.0 and when I try to deploy a new project, using rails new truck command I'm receiving the following error:
package configuration for /usr/local/lib/ruby/gems/3....
0
votes
2
answers
167
views
Need help in understanding the Capsicum capability mode and its effect on getpass()
I am experimenting with the Capsicum framework on FreeBSD. I am trying to learn how to use its sandboxing capabilities. While experimenting, I discovered that if I enter capability mode with cap_enter(...
2
votes
1
answer
383
views
Are there always-used and Kernel-specific system call for BSDs and Linux?
I am currently working on a project depends on detecting which OS the executable belong to.
I am only working on ELF executable format so I tried to use e_ident[EI_OSABI] value but doesn't give ...
0
votes
1
answer
115
views
Makefile .for and .if expansion
I'm wanting to run a Makefile with
.if "${WITH_DOT}" != "0"
VIS+= day21.dot day21.pdf
.endif
but I'm getting
Makefile:17: *** missing separator. Stop.
The only link I ...
0
votes
2
answers
61
views
Slow query with 3 seconds of execution
Using FreeBSD freebsd 13.2-RELEASE-p2 FreeBSD 13.2-RELEASE-p2 GENERIC amd64 as ec2 instace(t2.xlarge) and mariadb104-server-10.4.28: mysql Ver 15.1 Distrib 10.5.20-MariaDB, for FreeBSD13.2 (amd64) ...
0
votes
1
answer
164
views
Run script after a SSH client disconnects
I am trying to research for possible solutions on how to execute a script on FreeBSD after a SSH client disconnects. I have found numerous solutions, but all but one actually deal with a different ...
0
votes
1
answer
98
views
Checksum ip header segmentation fault C
Checksum ip header segmentation fault C.
The error started to occur when I started to move the program to freebsd, everything was working from linux.
Now, the error occurs on this line -
const ...
2
votes
1
answer
2k
views
What is the cause of the segmentation fault during the vulkan instance creation?
I am writing a vulkan powered app, and I noticed it wasn't working. I kept on removing code until i reached this:
#include <vulkan/vulkan.h> ...
1
vote
0
answers
622
views
Resolve issue building wheel for numpy on freebsd
I'm having trouble getting numpy installed on in a freebsd jail (13.2-release) (truenas).
I've got python 3.11.3 installed and am using pip 23.1.2.
Specifics are - I can use pkg to install py311-numpy ...