I hereby claim:
- I am hermes-pimentel on github.
- I am hermespimentel (https://keybase.io/hermespimentel) on keybase.
- I have a public key ASA971Ff9OF6C8RkieT5V_AjY-yCKihJJsC-yu2xjVtxlAo
To claim this, I am signing this object:
import json | |
import boto3 | |
from functools import reduce | |
import logging | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
client = boto3.client('kafka') |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
# the Software, and to permit persons to whom the Software is furnished to do so. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | |
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
#!/bin/bash | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
# the Software, and to permit persons to whom the Software is furnished to do so. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
''' | |
This script sets a retention on all the logGroups that don't have one set | |
''' | |
import boto3 | |
import logging | |
# Retention it will be set to | |
RETENTION = 30 |
Windows Service with Python 3.5 and pyinstaller
# Jupyter configuration # | |
c.NotebookApp.open_browser = False | |
c.NotebookApp.port = 9090 | |
c.NotebookApp.password = u'sha1:somepass' | |
c.Authenticator.admin_users = {'hadoop'} | |
c.LocalAuthenticator.create_system_users = True | |
c.NotebookApp.contents_manager_class = 's3contents.S3ContentsManager' | |
c.S3ContentsManager.bucket_name = 'my-bucket' | |
c.S3ContentsManager.prefix = 'notebooks' |
#!/usr/bin/env bash | |
set -x -e | |
JUPYTER_PASSWORD=${1:-"myJupyterPassword"} | |
NOTEBOOK_DIR=${2:-"s3://myS3Bucket/notebooks/"} | |
# home backup | |
if [ ! -d /mnt/home_backup ]; then | |
sudo mkdir /mnt/home_backup | |
sudo cp -a /home/* /mnt/home_backup |
--- | |
- name: test if grub configured for noop i/o scheduler | |
command: egrep -q 'elevator=noop' /boot/grub2/grub.cfg | |
register: grub | |
changed_when: no | |
failed_when: grub_test.rc == 2 | |
- name: configure grub for noop i/o scheduler | |
sudo: yes | |
command: grubby --update-kernel=ALL --args=elevator=noop |
journalctl | |
This will display the logs with the oldest entries first. Although this is simple, it is not very useful since we do not tend to read logs like a book. | |
By default journalctl displays the logs in a pager. It shows you one page of logs requiring you to hit the space bar to proceed. Also long log lines WILL NOT wrap, they will trail off the right side of the screen. You can use the right arrow to see the rest of the line. | |
We will talk more about changing the way the logs are displayed in a different article. Let's move on to some basic log viewing commands. | |
Diplaying Logs by Date |