recentpopularlog in

kme : sysadmin   1282

« earlier  
Bashhub · Every command. |
Hope there are no passwords or API keys in your history.
sysadmin  linux  unix  bash  history  cloud  cloudstorage  searchengine 
25 days ago by kme
How to get a comma separated table of installed Windows programs using PowerShell? - Stack Overflow
<code class="lang-powershell">Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
Select-Object DisplayName, DisplayVersion |
ConvertTo-Csv -NoTypeInformation</code>
windows  sysadmin  softwaremanagement  powershell  shellscripting  solution 
26 days ago by kme
10 Ways to Open the Command Prompt in Windows 10 |
Right-clicking on the Start menu now shows 'PowerShell' instead of 'Command Prompt' options, as of the "Creators" update.
windows  sysadmin  powershell  commandprompt  cmd  newbie  howto 
26 days ago by kme
How to Delete Recovery Partition in Windows 7/8/10 (Solved)
One time I had this Windows (VM) where the recovery partition was *after* the C: partition, preventing me from resizing it. Disk Management snap-in prevents you from deleting this partition. Bullshit.

You can 'delete partition override' in DISKPART, though.
windows  win10  storage  diskmanagement  diskadministrator  sysadmin  solution 
26 days ago by kme
Unreliable Cronjobs - fREW Schmidt's Foolish Manifesto
The general pattern that we suggest at work is to run your cronjobs five to ten times more often than you need to and to exit early if there is no work to do. In addition, you should monitor what the cronjob produces (which obviously varies wildly, per cronjob) rather than the sythentic exit code or output from the cronjob. This can both help you to avoid being paged when a cronjob is a little flaky and additionally detect a cronjob that is failing but still exiting zero.
sysadmin  cron  scheduling  systemmonitoring  automation  tipsandtricks 
28 days ago by kme
Error 422 The change you requested was rejected on login (#40898) · Issues · / GitLab FOSS · GitLab
For those running into this issue, have you tried flushing the session store in Redis? Delete all keys that start with session:gitlab from Redis.

A good reference for that is, if you just update the instructions to use '/var/opt/gitlab/redis/redis.socket' and 'redis-cli --scan --pattern "session:gitlab:*"' instead.

Useful comments:
- (Apache)
- (Redis)
gitlab  sysadmin  error422  errormessage  solution 
29 days ago by kme
Cleaning up stale Redis sessions | GitLab
GitLab Omnibus puts the socket at /var/opt/gitlab/redis/redis.socket, and Redis 3.2.something doesn't accept the 'KEY' command anymore (use 'redis-cli --scan --pattern "session:gitlab:*"' instead), so update accordingly.

<code class="language-bash">rcli() {
# This example works for Omnibus installations of GitLab 7.3 or newer. For an
# installation from source you will have to change the socket path and the
# path to redis-cli.
sudo /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.shared_state.socket "$@"

# test the new shell function; the response should be PONG
rcli ping</code>
sysadmin  gitlab  sessionmanagement  sessionstore  sessions  solution 
29 days ago by kme · master · / gitlab-workhorse · GitLab
FIXME: sit down and document how I *actually* did this. I don't think it was necessary to specify the auth backend in /etc/gitlab/gitlab.rb.
Relative URL support If you are mounting GitLab at a relative URL, e.g., then you should also use this relative URL in the authBackend setting:
<code class="language-bash">gitlab-workhorse -authBackend http://localhost:8080/gitlab</code>
gitlab  workhorse  config  sysadmin  webmaster 
5 weeks ago by kme
How to configure docker to use proxy – The Geek Diary
See also:
1. Create a drop-in
<code class="language-bash">sudo mkdir /etc/systemd/system/docker.service.d</code>

2. Create a file with name /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:
<code class="language-ini">[Service]

3. reload the systemd daemon
<code class="language-bash">sudo systemctl daemon-reload</code>

4. restart docker
<code class="language-bash">sudo systemctl restart docker</code>

5. Verify that the configuration has been loaded:
<code class="language-bash">sudo systemctl show docker --property Environment
# result:
docker  sysadmin  systemd  proxy  configfile  configuration  solution 
5 weeks ago by kme
Backups | GitLab
Note: Running
<code class="language-bash">sudo gitlab-ctl backup-etc <DIRECTORY></code> will place the backup in the specified directory. The directory will be created if it does not exist. Absolute paths are recommended.

Note: backup-etc introduced in GitLab 12.3.
gitlab  configuration  backup  disasterpreparedness  sysadmin  solution 
5 weeks ago by kme
upstart - How to enable or disable services? - Ask Ubuntu
(FOR UPSTART) To toggle a service from starting or stopping permanently you would need to:
<code class="language-bash">echo manual | sudo tee /etc/init/SERVICE.override</code>
upstart  systemd  ubuntu  centos  linux  sysadmin  dammitbrain  solution 
5 weeks ago by kme
Elasticsearch integration | GitLab
Note that you have to have a paid (at least "Starter") license for the Elasticsearch options to even show up in the Admin Area. It doesn't work to just stick some config options in /etc/gitlab/gitlab.rb and 'gitlab-ctl reconfigure'. :-(

<code class="language-bash"># Create empty indexes
sudo gitlab-rake gitlab:elastic:create_empty_index

# index personal snippets
sudo gitlab-rake gitlab:elastic:index_snippets
gitlab  gitlab-ee  elasticsearch  searchandindex  webmaster  sysadmin  solution 
6 weeks ago by kme
Install Elasticsearch with RPM | Elasticsearch Reference [7.5] | Elastic
An alternative package which contains only features that are available under the Apache 2.0 license is also available. To install it, use the following baseurl in your elasticsearch.repo file:

Not positive how fussy GitLab is about the *exact* version (it says 5.6 - 6.x here -, but unsurprisingly you can get Elasticsearch 6.x OSS packages with this 'baseurl' instead:
sysadmin  devops  centos  centos6  centos7  elasticsearch  rpm  installation  howto  reference  solution 
6 weeks ago by kme
Hardware | Elasticsearch: The Definitive Guide [2.x] | Elastic
A machine with 64 GB of RAM is the ideal sweet spot, but 32 GB and 16 GB machines are also common. Less than 8 GB tends to be counterproductive (you end up needing many, many small machines), and greater than 64 GB has problems that we will discuss in Heap: Sizing and Swapping.

Interesting node about the I/O scheduler used on a system with SSDs:
Check Your I/O Scheduler

If you are using SSDs, make sure your OS I/O scheduler is configured correctly. When you write data to disk, the I/O scheduler decides when that data is actually sent to the disk. The default under most *nix distributions is a scheduler called cfq (Completely Fair Queuing).

This scheduler allocates time slices to each process, and then optimizes the delivery of these various queues to the disk. It is optimized for spinning media: the nature of rotating platters means it is more efficient to write data to disk based on physical layout.

This is inefficient for SSD, however, since there are no spinning platters involved. Instead, deadline or noop should be used instead. The deadline scheduler optimizes based on how long writes have been pending, while noop is just a simple FIFO queue.

This simple change can have dramatic impacts. We’ve seen a 500-fold improvement to write throughput just by using the correct scheduler.
searchandindex  sysadmin  elasticsearch  architecture  systemrequirements  performance 
6 weeks ago by kme
Prevent .DS_Store file creation on network volumes - Mac OS X Hints
<code class="language-bash">find /Volumes/PSP/ | grep -ir '\(\._\..*\|\.AppleDouble\|\.AppleDesktop\|ws_ftp\.log\|Thumbs\.db\|pspbrwse\.jbf\)$' \
| sed 's/^\(.*\)$/rm -f "\1"/' | /bin/sh</code>
finder  mac  macos  annoyance  network  filesytem  sysadmin 
7 weeks ago by kme
linux - rsync copy over only certain types of files using include option - Stack Overflow
Here's the important part from the man page:
As the list of files/directories to transfer is built, rsync checks each name to be transferred against the list of include/exclude patterns in turn, and the first matching pattern is acted on: if it is an exclude pattern, then that file is skipped; if it is an include pattern then that filename is not skipped; if no matching pattern is found, then the filename is not skipped.

To summarize:

* Not matching any pattern means a file will be copied!
* The algorithm quits once any pattern matches

Also, something ending with a slash is matching directories (like find -type d would).

Let's pull apart this answer from above.
<code class="language-bash">rsync -zarv --prune-empty-dirs --include "*/" --include="*.sh" --exclude="*" "$from" "$to"</code>

* Don't skip any directories
* Don't skip any .sh files
* Skip everything
* (Implicitly, don't skip anything, but the rule above prevents the default rule from ever happening.)

Finally, the --prune-empty-directories keeps the first rule from making empty directories all over the place.
rsync  backupandrecovery  filemanagement  sysadmin  solution 
8 weeks ago by kme
md5sum on Mac OS X | check MD5 hashes
tl;dr: use 'md5', but it doesn't have a '-c' option.
macos  checksum  hashes  md5  sysadmin  security  sortof  solution 
9 weeks ago by kme
I have the best users.... : sysadmin
We're 47 1/2 hours into a system wide network outage that took down all of our storage and by extension our VMWare infrastructure. We're finally on the downside and hope to have mission critical up by Sunday.But various departments have provided a steady stream of support in the form of food & drinks while we work 16 - 20 hours a day to get this back up. Literally they setup a buffet table in a conference room. Sometimes I love my users and my organization.

from the comments:
Someone didn't set SCE to Aux

Sounds like someone forgot to water the spanning tree again
sysadmin  users  forthecomments 
9 weeks ago by kme
Uploading big files > 512MB — ownCloud 8.0 Server Administration Manual 8.0 documentation
Set the following two parameters inside the corresponding .ini file:
<code class="language-ini">php_value upload_max_filesize = 16G
php_value post_max_size = 16G

Adjust these values for your needs. If you see PHP timeouts in your logfiles, increase the timeout values, which are in seconds:
<code class="language-ini">php_value max_input_time 3600
php_value max_execution_time 3600</code>
webmaster  sysadmin  owncloud  bigfiles  uploader  filesharing  collaboration  solution 
9 weeks ago by kme
FAQ - btrfs Wiki
From kernel 5.0+ btrfs have native swap files support, but with some limitations. Swap file - must be fully allocated as NOCOW with no compression on one device.
linux  sysadmin  swap  swapfile  btrfs  solution 
9 weeks ago by kme
Solved: Isilon Vs ECS - Dell Community
Furthermore Isilon is more a "Filecentric" solution which offers you access to files through different protocols while ECS is "Objectstorage" which offers you acces to objects through several protocols, this said ECS has WORM by design.

Think of ECS in the same way as you may have thought of Centera in the past, a really big archive. It can do more as sluetze said with regards to geo-load balancing and so-forth, and supports the Centera CAS API, and S3. File protocols were added later to ECS initially NFSv3 only, and I think recently SMB as well. But on the big data side it doesn't speak HDFS like Isilon does, and it's not meant to be best of breed performance for really large HDFS datasets. As I understand it the HDFS access is actually over NFS using a java library. So maybe a good spot for cold buckets of data, not hot.
enterpriseclass  storage  isilon  emc  ecs  sysadmin 
10 weeks ago by kme
monitoring - Is there a tool that allows logging of memory usage? - Unix & Linux Stack Exchange
Valgrind and syrupy ( are two options.

Also ('pidstat -r' is what you want):

The pidstat command also from the sysstat package provides a fairly nice interface for reporting statistics on single process. – Steven D Jan 13 '11 at 22:21

Today I learned:
Occasionally when the need arises I just do:
<code class="language-bash">$ top -d 1 -b |grep <process> >>somefile</code>

It's not an elegant solution, but gets the job done if you want the quick crude value to verify your hypothesis.
sysadmin  memory  systemmonitoring  profiling  debugging  maybesolution 
12 weeks ago by kme
escaping double quotes and percent signs (%) in cron - Server Fault
You have to escape the % signs. They have a special meaning in crontabs:
cron  crontab  shellscripting  sysadmin  dammitbrain  solution 
october 2019 by kme
HowTos/NewerApps - CentOS Wiki
You might need to do something like

<code class="language-bash">
yum-config-manager --enable centos-sclo-sclo
yum-config-manager --enable centos-sclo-sclo-rh

…even *after* installing the 'centos-release-scl' package.
centos  epel  scl  sysadmin  packagemanagement  centos6  solution 
october 2019 by kme
bash - How to check if a process id (PID) exists - Stack Overflow
Looks like 'ps -p $PID' is the way to go; 'kill -0 $PID' has caveats.
unix  linux  sysadmin  processmanagement  shellscripting 
october 2019 by kme
How to check if port is in use on Linux or Unix - nixCraft
<code class="language-bash">sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
sudo nmap -sTU -O IP-address-Here</code>
linux  bash  sysadmin  networking  solution 
october 2019 by kme
json - xargs: how to have literal double-quotes in replacement? - Stack Overflow
GNU Parallel was built specifically to deal with xargs bad handling of special chars:
<code class="language-bash"><source parallel curl -X POST -H "application/json" myURL -d {}</code>
shellscripting  sysadmin  xargs  gnuparallel  quoting  woes 
september 2019 by kme
hard drive - Disk usage per user in Linux / Unix - Server Fault
<code class="language-bash">find . -type f -printf "%u %s\n" \
| awk '{user[$1]+=$2}; END{for(i in user) print i,user[i]}'</code>
diskusage  sysadmin  linux  unix  solution 
september 2019 by kme
find disk usage per user on a filesystem
<code class="language-bash">find / -printf "%u %s\n" \
| awk '{user[$1]+=$2}; END{ for( i in user) print i " " user[i]}'</code>
bash  unix  sysadmin  diskusage  quota  storage  solution 
september 2019 by kme
The Complete Guide to Creating Symbolic Links (aka Symlinks) on Windows
<code class="lang-batch">
:: Use /D when you want to create a soft link pointing
:: to a directory. like so:
mklink /D Link Target
symlink  junctionpoints  directoryjunction  hardlink  windows  sysadmin  cli  commandline  mklink  reference  solution  dammitbrain 
september 2019 by kme
How to list all tags of a docker image
This is one way to do this, and it works. See also this Gist, which 'docker pulls' a bunch of Bash images to see if that version of Bash has a certain 'shopt' option:
<code class="language-bash">
for (( i=0; $?==0; i++ )); do
curl -sL$image/tags/?page=$i 2>/dev/null \
| jq -r '.results[]["name"]'
You can also get the total number of tags from the "count" attribute of the first JSON response, which also gives you the "next" URL.

Possibly see also:, but I don't know what the difference between Docker Hub, Docker Registry, and a Docker "Trusted" Registry is, or which one exactly the public Docker Hub is.
docker  cli  commandline  containers  automation  sysadmin  solution 
august 2019 by kme
passwords - MySQL Utilities - ~/.my.cnf option file - Stack Overflow
The gist is that the other utilities ('mysqldump', for example) use different "defaults groups."
mysql  commandline  cli  sysadmin  dba  newbie  question  answered  solution 
august 2019 by kme
How to Check CentOS Version Number
<code class="language-bash">cat /etc/centos-release</code>
sysadmin  centos  release  solution 
july 2019 by kme
Th Most Handy du (Disk Usage) Commands in Linux - Make Tech Easier
Honestly did not know about the '--threshold' or exclusion options.
sysadmin  diskspace  unix  linux  du  tipsandtricks 
july 2019 by kme
OpenConnect VPN client. |
On Linux, it's possible to create its tun device in advance. For example:
<code class="language-bash">
# ip tuntap add vpn0 mode tun user dwmw2

This creates a device vpn0 which can be opened by user dwmw2 who can pass traffic to/from it without needing any elevated privileges. You can now tell OpenConnect to use that device by adding "-i vpn0" to its command-line arguments. Note that the /dev/net/tun device node should be readable and writeable by everyone. (Some distributions misconfigure that, so if it isn't world-writeable then please file a bug against your distribution.)
vpn  cisco  anyconnect  linux  networking  sysadmin  maybesolution 
july 2019 by kme
« earlier      
per page:    204080120160

Copy this bookmark:

to read