Skip to content

Instantly share code, notes, and snippets.

View danmack's full-sized avatar

Dan Mack danmack

View GitHub Profile
@danmack
danmack / final summary
Last active June 26, 2018 03:53
gzip vs pigz with-without hyper threading i7-3930k
[root@f292b233-6a5b-e858-898a-85d89db534c5 ~]# ministat -c 99.5 -s -w 60
trial.1 trial.2
x trial.1
+ trial.2
+------------------------------------------------------------+
|x +|
|x +|
|x +|
|x +|
|x +|
]
{
"nic_tag": "admin",
"ip": "172.22.1.3",
"netmask": "255.255.248.0",
"gateway": "172.22.0.253"
},
{
"nic_tag": "admin",
"ip": "172.22.18.252",
[root@macktron ~]# uname -a
SunOS macktron 5.11 joyent_20180830T001556Z i86pc i386 i86pc
[root@macktron ~]# cat /etc/issue
*--+--*--*
|\ |\ |\ |\ J O Y E N T
| \| \| \| \ ##### #### # ##### ### # # TM
+--*--+--*--* # # # # # # # ## #
@danmack
danmack / gist:f7ed5dd3cf4a39aa0a39f051f333ad43
Last active October 5, 2018 15:53
example bhyve json config for smartos
{
"brand": "bhyve",
"vcpus": "2",
"ram": "16384",
"alias": "centos-bhyve1",
"hostname": "centos-bhyve1",
"dns_domain": "example.com",
"resolvers": ["8.8.8.8", "8.8.4.4"],
"disks": [
{
@danmack
danmack / gist:6d69a6d2ab08e6dbf8a1727e9c2267a0
Created December 5, 2018 16:32
SmartOS add disk to bhyve linux container
Adding a new disk to a bhyve vm takes a few steps.
1. increase the quota on the zfs dataset to accomodate the additional
space.
2. create a zvol inside the zone
3. stop the vm and update its configuration to reflect the change
4. start the vm, login and use the disk
# update quota
{
"brand": "bhyve",
"alias": "centomdano",
"hostname": "centodano",
"dns_domain": "example.com",
"vcpus": 2,
"ram": 4096,
"resolvers": ["8.8.8.8", "8.8.4.4"],
"disks": [
{
@danmack
danmack / bug-report1.txt
Last active April 18, 2019 14:06
fedora:30 container not cannot run yum or dnf without SEGV
$ c=$(buildah from fedora:30)
Getting image source signatures
Copying blob 160e9aefb317: 85.15 MiB / 86.30 MiB [=============================]
Copying blob 160e9aefb317: 86.30 MiB / 86.30 MiB [==========================] 7s
Copying config ad0d3c0bf762: 1.99 KiB / 1.99 KiB [==========================] 0s
Writing manifest to image destination
Storing signatures
fano:~/src/cont$
fano:~/src/cont$ buildah run $c -- dnf update -y
@danmack
danmack / inspect.bash
Last active April 19, 2019 15:56
buildah podman skopeo rodeo
mega:~/src/cont$ podman inspect localhost/fc30b
[
{
"Id": "d49e72ff10298e8a50b33c3b3b451acd342146858b0e4354dea926d785839620",
"Digest": "sha256:cd3852ebf1ab5ce7751e9fd15bd09acb247147ba3f24a47fcc2998ee948feffd",
"RepoTags": [
"localhost/fc30b:latest"
],
"RepoDigests": [
"localhost/fc30b@sha256:cd3852ebf1ab5ce7751e9fd15bd09acb247147ba3f24a47fcc2998ee948feffd"
@danmack
danmack / make-rootless-conf
Created April 23, 2019 18:40
fedora 30 - building container image fails
[mack@hyperion skunk]$ cat mk-fc30-image
#!/bin/bash
cont=$(buildah from fedora:30)
buildah run "$cont" -- dnf update -y
buildah commit "$cont" fc30b
[mack@hyperion skunk]$ buildah images
IMAGE NAME IMAGE TAG IMAGE ID CREATED AT SIZE
docker.io/library/fedora 30 ad0d3c0bf762 Apr 3, 2019 17:20 311 MB
localhost/fc30b latest e1e8d0d135a7 Apr 23, 2019 13:35 311 MB
@danmack
danmack / gist:3a64940b46490b57d01138f9f205d30c
Last active May 7, 2019 19:44
nvidia card driver issue - fallback to nouveau
fc30 packages installed:
$ rpm -qa|grep nvidia
xorg-x11-drv-nvidia-418.56-1.fc30.x86_64
xorg-x11-drv-nvidia-kmodsrc-418.56-1.fc30.x86_64
xorg-x11-drv-nvidia-libs-418.56-1.fc30.x86_64
kmod-nvidia-5.0.11-300.fc30.x86_64-418.56-2.fc30.x86_64
xorg-x11-drv-nvidia-cuda-libs-418.56-1.fc30.x86_64
akmod-nvidia-418.56-2.fc30.x86_64