Skip to content

Instantly share code, notes, and snippets.

Dan Langille dlangille

Block or report user

Report or block dlangille

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dlangille
dlangille / example run
Created Dec 10, 2019
Locate the data directory for PostgreSQL on FreeBSD
View example run
$ ./get_postgresql_data
/var/db/postgres/data12
@dlangille
dlangille / output
Created Dec 6, 2019
extracting each element separated by : from within 113R:2019Q4:py36
View output
$ ~/tmp/test-params
113R
2019Q4:py36
2019Q4
py36
@dlangille
dlangille / testing change
Last active Nov 26, 2019
I have clones that I want to promote to real filesystems
View testing change
My goals:
* data01/testing/dev-pgeu becomes a non-clone
* keep data01/testing/12.0-RELEASE
* remove snapshot data01/testing/12.0-RELEASE@dev-pgeu
[dan@r720-01:~] $ sudo zfs create data01/testing
[dan@r720-01:~] $ sudo zfs create data01/testing/12.0-RELEASE
[dan@r720-01:~] $ sudo zfs snapshot data01/testing/12.0-RELEASE@dev-pgeu
@dlangille
dlangille / r720-01 output
Created Nov 23, 2019
Sample lsblk output on FreeBSD
View r720-01 output
[dan@r720-01:~] $ lsblk
DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
ada0 0:153 75G GPT - -
ada0p1 0:168 512K freebsd-boot gpt/gptboot0 -
<FREE> -:- 492K - - -
ada0p2 0:169 2.0G freebsd-swap gpt/swap0 -
ada0p3 0:170 73G freebsd-zfs gpt/zfs0 <ZFS>
<FREE> -:- 68K - - -
ada1 0:154 75G GPT - -
ada1p1 0:171 512K freebsd-boot gpt/gptboot1 -
View logstash poudriere testport output
see also https://gist.github.com/dlangille/5a4d586507738f5acb173688080cf7c0
Now using this in sysutils/logstash6/Makefile
NO_CCACHE= yes
CFLAGS+= "-I/usr/local/openjdk8/include"
The output:
@dlangille
dlangille / all hosts
Last active Nov 12, 2019
FreshPorts - changing the database server
View all hosts
$ grep pg03 /usr/local/etc/nrpe.cfg
command[check_pgsql] =/usr/local/libexec/nagios/check_pgsql -d template1 -H pg03.int.unixathome.org -l nagios -p '[redacted]' -o 'sslmode=require'
@dlangille
dlangille / nginx.conf
Created Nov 11, 2019
Poudriere configuration
View nginx.conf
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
# Allow gzipping js, css, log, svg and json files.
View Show the drives
[dan@r720-01:~] $ sudo mpsutil -u 1 show devices
B____T SAS Address Handle Parent Device Speed Enc Slot Wdt
500056b37789abff 0009 0001 SMP Target 6.0 0002 00 8
00 08 500056b37789abe4 000a 0009 SATA Target 6.0 0002 08 1
00 09 500056b37789abe5 000b 0009 SATA Target 6.0 0002 09 1
00 21 500056b37789abe7 000d 0009 SATA Target 6.0 0002 11 1
00 22 500056b37789abe8 000e 0009 SATA Target 6.0 0002 12 1
00 23 500056b37789abe9 000f 0009 SATA Target 6.0 0002 13 1
00 19 500056b37789abea 0010 0009 SATA Target 6.0 0002 15 1
00 10 5001e8200275bf02 0011 0009 SAS Target 6.0 0002 01 1
@dlangille
dlangille / 1 - the cards in this system
Last active Nov 8, 2019
Let's locate da11 and make the light flash
View 1 - the cards in this system
[dan@r720-01:~] $ sudo sas2ircu list
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.
Adapter Vendor Device SubSys SubSys
Index Type ID ID Pci Address Ven ID Dev ID
----- ------------ ------ ------ ----------------- ------ ------
0 SAS2008 1000h 72h 00h:42h:00h:00h 1028h 1f1ch
View 1 - the output
[dan@samdrucker:~/bin] $ ~/bin/samdrucker.sh
{
"name": "samdrucker.int.unixathome.org",
"os": "FreeBSD",
"version": "12.0-RELEASE-p10",
"repo": "pkg+http://fedex.unixathome.org/packages/120amd64-default-master-list/",
"packages": [
"apache24-2.4.41",
"apr-1.7.0.1.6.1",
"bash-5.0.11",
You can’t perform that action at this time.