Browse Source

add some netbsd lua hints

master
Markus Bergholz 3 years ago
parent
commit
843ceb1949
  1. 31
      til.md

31
til.md

@ -380,3 +380,34 @@ dump a live system without blocking
* for InnoDB
`nice -n 19 ionice -c2 -n 7 mysqldump --single-transaction=TRUE <dbname> > dump.sql`
# NetBSD
```
PATH="/usr/pkg/sbin:$PATH"
PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/amd64/8.0_current/All/"
export PATH PKG_PATH
pkg_add bash nano
```
## NetBSD luactl
```
modload lua
luactl create mycpu
luactl load mycpu ./cpu.lua
```
print to `/var/log/messages` using systm module
```
cat hw.lua
systm.print("hello kernel!\n")
modload luasystm
modstat |grep lua
luactl require helo systm
luactl load helo ./hw.lua
cat /var/log/messages
...
Oct 9 09:37:29 localhost /netbsd: hello kernel!
```
Loading…
Cancel
Save