RSS

Posts in 2020

  • Use Linux SO_BINDTODEVICE and mac IP_BOUND_IF to bind socket to a network interface

    Last Update: in Linux

    Use Linux SO_BINDTODEVICE and mac IP_BOUND_IF / IPV6_BOUND_IF to bind socket to a network interface

    SO_BINDTODEVICE on Linux In Linux, SO_BINDTODEVICE is a socket option can be used in setsockopt() to bind a socket to network interface. e.g. #include <sys/types.h> #include <sys/socket.h> const char *interface_name = "eth0"; …

    Read more

  • Find 3rd party gems global variables in ruby

    in Rails

    Find 3rd party gems global variables in ruby

    Why Need Find Global Variables In rails, if you want to use puma as rails server, you need make sure your app is thread safe, not only your app code itself, also 3rd party gems should also thread safe. One of requirement for thread safe is avoid …

    Read more

  • Troubleshooting Splunk Search Performance by Search Job Inspector

    Last Update: in Splunk

    How to use Splunk Search Job Inspector to troubleshooting search performance issue, understand how search was processed and where splunk spent time.

    Splunk timechart Command – Overview timechart command performs statistical aggregations against time Plots and trends data over time _time is always the x-axis You can optionally split data using the by clause for one other field Each distinct value …

    Read more

  • Troubleshooting Splunk Search Performance by Search Job Inspector

    Last Update: in Splunk

    How to use Splunk Search Job Inspector to troubleshooting search performance issue, understand how search was processed and where splunk spent time.

    What is Search Job Inspector The Search Job Inspector and the Job Details dashboard are tools that let you take a closer look at what your search is doing and see where the Splunk software is spending most of its time. Search Job Inspector allows you …

    Read more

  • Splunk != vs. NOT Difference Detail Explained with Examples

    Last Update: in Splunk

    Different between != and NOT in Splunk search condition, search result and performance impact. How to exclude field from search result?

    When you want to exclude results from your search you can use the NOT operator or the != field expression. However there is a significant difference in the results that are returned from these two methods. != vs. NOT Comparison Both!= field …

    Read more

  • Splunk Search Best Practices for Better Performance Response Time

    Last Update: in Splunk

    Tips on splunk search best practices for better performance response time. Guidelines on create splunk search.

    Splunk search best practices, a quick guideline on splunk search, write better search to improve your search quality and boost query time. Notes from Splunk Fundamentals. Time is the most efficient filter keep the time range short (e.g. last 60 …

    Read more

  • Install Splunk and Forwarder on Linux

    in Splunk

    Step by step install Splunk, Splunk Forwarder, Splunk app free trial version on Linux.

    Install Splunk Download from https://www.splunk.com/en_us/download/splunk-enterprise Download Splunk 8 via Command Line (wget): # .deb For Debian and Ubuntu $ wget -O splunk-8.0.3-a6754d8441bf-linux-2.6-amd64.deb …

    Read more

  • Azure Change App Service HTTP Ping URL and Interval

    Last Update: in Azure

    In Azure app service, I want to change the keep-alive time period and want to change the HTTP ping (keep-alive) URL to /status, the default keep-alive URL is /.

    Issues Description In Azure app service, I want to change the keep-alive time period and want to change the HTTP ping (keep-alive) URL to /status, the default is /. Answer from Azure support I can not find proper answer so send request to Azure …

    Read more

  • Organize Go Project

    in Go

    demonstrates the development of a simple Go package inside a module and introduces the go tool, the standard way to fetch, build, and install Go modules, packages, and commands.

    Code organization Go programs are organized into packages. A package is a collection of source files in the same directory that are compiled together. Functions, types, variables, and constants defined in one source file are visible to all other …

    Read more

  • Docker container to connect localhost of host

    in Docker

    Inside Docker container, want to connect service on localhost of host machine. There is a magic hostname host.docker.internal can be used inside Docker container to reach localhost of host machine.

    Problem I have redis running in localhost, when I run a docker VM, I want to connect redis from inside of Docker VM, so I do not need docker-compose for another redis VM. Solution Docker for Mac: use host.docker.internal For Docker on Mac, there is a …

    Read more