2026/10/08

今天在升級 splunk時又出現以下問題

rpm -Uhv splunk-10.6.0.5-86587d4e3b27.x86_64.rpm
warning: splunk-10.6.0.5-86587d4e3b27.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID b3cd4420: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
verify that this sytem has all the commands we will require to perform the preflight step
This looks like an upgrade of an existing Splunk Server. Checking to see what component we are installing
extracting splunk_preinstall_base64 into splunk/bin directory
Cannot initialize: /opt/splunk/etc/system/metadata/local.meta: Permission denied
Cannot initialize: /opt/splunk/etc/apps/learned/metadata/local.meta: Permission denied
Currently configured KVStore database path="/opt/splunk/var/lib/splunk/kvstore"

-> Version file="/opt/splunk/var/run/splunk/kvstore_upgrade/versionFile70" does not exists or not accessible!
Failed to open file! Error=Permission denied

最近好几次有碰到同樣的狀況
搞了半天
最後用最簡單粗暴的方式解決
chmod -R 777 /opt/splunk/

再跑一次安裝就好了

2026/10/05

有user最近几天一直有大流量
但目前只能看到目的ip 無法知道是什麼程式造成
寫個bat 定時排程記錄
如果再發生有log可以查

@echo off
:: 取得年月日
set "yy=%date:~0,4%"
set "mm=%date:~5,2%"
set "dd=%date:~8,2%"

:: 取得時分秒
set "hh=%time:~0,2%"
set "min=%time:~3,2%"
set "ss=%time:~6,2%"

:: 如果小時小於 10(前面有空格),補 0
if "%hh:~0,1%"==" " set "hh=0%hh:~1,1%"

set "dt=%yy%%mm%%dd%_%hh%%min%%ss%"

echo 當前時間檔名:%dt%
tcpvcon.exe -a -c -n > "%dt%.csv"

2026/10/03

之前如果要打包並執行都會使用7z 再轉成執行檔
後來找了 bandizip 感覺方便許多

最近又發現 bat to exe
可以把所有需要的檔案一次打包並執行寫好的批次檔
重點是使用這個方式
就不用怕被看到原始碼了 

有個問題 很容易被M$誤判