As we’ve got our fair share of folks who have only recently come to New Zealand in our team at work, we were discussing the many and varied things that can be done to soak up the incredible sights of summer in our region.
One of our guys really enjoys the outdoors and suggested “Epic Little Missions” as a great site which has curated some nice walks in the great outdoors. Having lived in Auckland my whole life I’d never come across the site myself but I’ve done quite a few of the walks it recommends. Certainly one for us to refer back to when kids need to get outside and enjoy the incredible 3D graphics, resolution and realistic haptic feedback of the outside world.
So, recently I had reason to try bench-marking an off the shelf NAS server against an Opensource alternative and I wanted to ensure the tests would be as fair as possible (and quick to implement).
As an aside, I thought that because it has been literally YEARS since I’d publicly documented any of my IT related antics, that I’d post this in case it helps others trying to do something similar.
I settled on writing a quick and dirty batch script which would, from a hard wired LAN client, map network drives to the two devices and copy a 1GB file to each. Prerequisites were;
Use a 1GB binary file (as binaries are the predominate file type transported in the environment).
Windows 10 native applications/commands only
Be as ‘pure’ as possible in measuring the raw IO of the devices being tested
Measurement needs to be granular enough to determine which device was performing the fastest.
REM This script creates drive mappings to NAS devices
REM A 1GB file is written to NAS each in turn and timings are recorded
REM Setup NAS Drive Mappings
NET USE S: \\220.127.116.11\WritableShare /WRITETHROUGH /PERSISTENT:NO
ECHO Existing NAS Mapped to S:
NET USE T: \\18.104.22.168\WritableShare /WRITETHROUGH /PERSISTENT:NO
ECHO Existing NAS Mapped to T:
ECHO Start Measure NAS-1 %Time% > C:\Users\myusername\Desktop\TestNAS_IO.log
ROBOCOPY C:\Users\myusername\Desktop\1GB S:\zTEST *
ECHO End Measure NAS-1 %Time% >> C:\Users\myusername\Desktop\TestNAS_IO.log
ECHO Start Measure NAS-2 %Time% >> C:\Users\myusername\Desktop\TestNAS_IO.log
ROBOCOPY C:\Users\myusername\Desktop\1GB T:\zTEST *
ECHO End Measure NAS-2 %Time% >> C:\Users\myusername\Desktop\TestNAS_IO.log
Echo Destroying Drive Mappings
NET USE S: /DELETE
NET USE T: /DELETE
In the script above, we initially create drive mappings to writable shares on each of the two devices.
The switch /WRITETHROUGH is a new function in Windows 10 which forces writes to go from client to the destination without getting caught up in any Windows (or other in-the-middle) caching in-between. The same tests can be re-run omitting the /WRITETHROUGH during drive mapping to see what (if any) effect caching has on the file copy process.
On our test client, we have created a directory (labelled 1GB) in which we have downloaded our 1GB binary file.
Prior to initiating the copy (or, in this case ROBOCOPY) command, we write the current time to a log file stored on the Windows Desktop of the test client.
Finally, like any good script, we return the environment to its former state (by deleting the network shares) prior to exiting the batch file.
I have recently had cause to pay a little more attention to the logs generated by my home firewall. While I use SARG for the day-to-day analysis, I needed a quick and easy command to fire at my squid logs to see what a particular device had been up to. This entry is by no means an exhaustive list, but it will serve as a handy reminder to me as to what I did to pull the data I needed to look at. Continue reading “Looking at logs…”
After an update to v2.2.6-RELEASE I had re-inherited the same
Error: Could not find report index file.
Check and save sarg settings and try to force sarg schedule.
On jumping onto the firewall via SSH, it appears that, at some point the sarg-reports directory under /usr/pbi/sarg-amd64/local/ had been turned into a symbolic link (this may have happened via the reinstallation of packages following the update).
As such, any attempts to link /usr/local/sarg-reports to /usr/pbi/sarg-amd64/local/sarg-reports would result in;
/usr/local/sarg-reports: Too many levels of symbolic links.
I had a message this morning from a friend who was having intermittent disconnection issues on their internet. The network itself was fine and, when using another provider, that too was working so it came down to evidence gathering to support the case to the ISP to investigate.
As a quick throw together, we came up with the following using wget and a batch file to repeat the command every x minutes.
We’ve just had some work done on one of our systems (which runs from a Raspberry Pi v2) so, aside from the config file backups that we can collect from the systems interface, I thought it would be prudent to grab an image backup.. this is how it was done: Continue reading “Backing up the Pi”
Usual Disclaimers Apply: This guide should not be used to subvert copyright restrictions. Responsibility falls to the user to ensure they are not breaking the laws of the country in which they reside or breaching any restrictions placed on content published in, or on infrastructure where other jurisdictions and/or terms of service may apply. Ignorance is no defense*, if you don’t like the regulations as they stand, exercise your democratic rights and propose a solution for change. Continue reading “Grabbing Video (back) from YouTube”
I’ve been playing with a few VMs as I try to figure out a new infrastructure for our office, and as part of this I’ve taken a particular shine to CentOS as a minimal build for my virtual servers. I then decided I wanted to get a few sandbox environments running with desktop software and, well.. that’s where the fun began!
After about twelvety-zillion restores from snapshots and reading, and forum trawling, and more restores, I think I’ve come up with a winning way to turn a humble CentOS 7 minimal build, booting to the lonely command prompt, into a bastion of desktoppy goodness. Hopefully this will be of use to someone else out there, if not – it will serve and a handy reminder to me as to what I did to get things running.