2023/07/28

APACHE http轉跳https 設定

最近在查怎麼讓web伺服器某些https的網站,在連線時,用http連會自動轉跳到https,查到的設定都好復雜,結果發現有一個人分享一個很簡單的方法,主要是利用連上http沒東西時,會自動幫你轉跳到https的頁面就可以了,只需要一行設定,可參考下列說明

ttps://www.orcy.net.cn/927.html 

2023/07/07

ESXi 6.5 的windows 2012虛擬機傳送ctrl alt del沒反應

在ESXi 6.5架設了一台windows 2012虛擬機,開啟了遠端桌面連線的功能,都可以使用,接著安裝了vmtool重開機後,使用chrome透過esxi的web console要登入主機時,傳送ctrl alt del沒反應。

使用遠端桌面連線,輸入完帳號密碼後,也都連不上,非常奇怪。

查了一下google,vmware有一篇文章是說要升級esxi,這個就先不考慮。

在經過一些測試後發現,是透過windows update進行更新時,會有一個vmware的套件,安裝了這個後,才會有傳送ctrl alt del沒反應的問題,所以在做windows update時不要裝這個套件就好了。


I have set up a Windows 2012 virtual machine on ESXi 6.5 and enabled the Remote Desktop Connection feature, which was working fine. Then I installed vmtools and rebooted the virtual machine. After that, when I tried to log in to the host using Chrome via ESXi's web console and sent Ctrl+Alt+Del, there was no response.

I also tried using Remote Desktop Connection, but after entering the username and password, I couldn't connect, which is very strange.

After searching on Google, I found an article from VMware suggesting upgrading ESXi, but for now, I'm not considering that option.

After some testing, I discovered that when updating through Windows Update, there is a VMware package that, when installed, causes the issue with Ctrl+Alt+Del not working. So, when performing Windows Update, it's advisable not to install this package.

2023/07/06

Excel 下方的分頁頁籤不見了

 EXCEL檔案不同的分頁,通常都在左下方可以做點選切換。

但某些檔案明明就有多個分頁,但下方卻都沒東西,無法切換。

這是設定的問題,只要在進階的設定裡,找到 顯示工作表索引標籤,將此功能打勾就會正常顯示其他分頁了。





Different worksheets in an Excel file are usually switchable by clicking on the tabs located at the bottom left.
However, in some cases, even though a file has multiple worksheets, there is no content displayed at the bottom, and switching between them is not possible.
This is a configuration issue. By going into the advanced settings and enabling the "Show sheet tabs" option, the other worksheets will be displayed correctly.

2023/07/04

IBM x345 亮橘燈

 有一台非常老舊的IBM x345,前面面板出現了硬體故障的橘燈,但這台伺服器的面板沒有其他資訊,就只燈號可以看。

檢查了外觀,硬碟都正常,沒其他亮橘燈的地方,就查不到橘燈是什麼地方異常造成的。

查看原廠文件,有說明主機板上會有其他硬體的燈號,有問題的就會亮橘燈。



所以就關閉系統,但接著電腦線,將上蓋打開,果然看到記憶體插槽上有亮橘燈,終於找到問題。

更妙的時打開上蓋後,發現有一個小面板藏在裡面,上面就有顯示哪個硬體故障,實在想不通為何要把這個面板藏在裡面。

回去查原廠文件,裡面還真的有寫到這個診斷面板是在伺服器裡面。



There is an old IBM x345 server that has a hardware failure indicated by an amber light on the front panel. However, the server's panel does not provide any additional information, only the indicator light is visible.

Upon inspecting the physical appearance, the hard drives appear to be functioning properly, and there are no other areas with illuminated amber lights, making it difficult to determine the source of the issue.

Referring to the manufacturer's documentation, it mentions that there are other hardware indicator lights on the motherboard, which would illuminate if there were any problems.

Therefore, shut down the system, and the computer cables were connected. Upon opening the server's cover, it was discovered that there was indeed an illuminated amber light on one of the memory slots, finally identifying the problem.

Interestingly, upon opening the cover, a small panel was found hidden inside, displaying the specific hardware component that was experiencing the failure. It is weird why this panel was concealed inside the server.

Upon revisiting the manufacturer's documentation, it was confirmed that this diagnostic panel is indeed located inside the server.




Shioaji 1分k轉成其他分k

 永豐shioaji可以把1分k做匯出,然後在自行轉成其他分k。

做法通常就是把1分k資料用pandas轉換成datafram,然後在用resample的方式,轉成其他的分k。

不過在轉成其他分k時,會遇到兩個問題。

第一是轉成其他k分時,會有從左邊算起或右邊算一起的問題,這就會影響到資料的正確性,關於這個,可以參考https://ithelp.ithome.com.tw/articles/10280495 這篇文章,用label跟closed兩個參數去調整資料的正確性。

系統預設是左邊,但在轉換shioaji的資料時,要從右邊算,出來的分k開高收低才會對。

第二個問題是在用resample重把切分1分k時,都是以完整一小時去切,譬如說你要換成30分k,系統就會用x點00分跟x點30分去切,但台指開盤是8點45分,應該要切成x點15分跟x點45分。

這時後就要在加一個base的參考,範例可參考 https://towardsdatascience.com/using-the-pandas-resample-function-a231144194c4 這篇最後面‘Base’ Argument的說明。


另外就是1分k只能用日期 去過濾,但裡面會包含到日跟夜盤的資料,如果只要日盤,或是特定時間,就要用between_time這個參考去過濾,範例可去https://geek-docs.com/pandas/pandas-dataframe/python-pandas-dataframe-between_time.html 看看。

Linux nautilus程序佔用cpu效能

 在執行top查看系統效能狀況時,發現有一支程序nautilus佔用了很高的cpu效能,但整體的cpu效能使用率還是很低,沒影響到系統整體的運作。


nautilus是在圖型介面,像是檔案總管的一個程序,透過"who"指令,確認還有一個透過圖型介面登入的session沒關閉,連上去之後果然發現很多資料夾視窗沒關閉,是其他人員之前在設定一些東西時,設定好就直接中斷沒關掉的。

將這些資料夾關一關,登入圖型介面後,這些程序也就不見了。

The Linux program Nautilus is consuming CPU resources.

While checking the system performance using the "top" command, I noticed that the Nautilus program is utilizing a significant amount of CPU power. However, the overall CPU usage remains low, and it does not affect the overall operation of the system.

Nautilus is a graphical interface program, similar to a file manager. By using the "who" command, I confirmed that there is still an active session logged in through the graphical interface. After connecting to it, I discovered that many folder windows were left open, which were not closed after configuring some settings by other personnel.

By closing these folders and logging into the graphical interface again, these programs disappeared.

2023/06/29

Teams 會議來賓無法文字聊天

 原本在使用Teams會議時,沒帳號的來賓,也可以透過"聊天"功能用文字聊天。但最近突然不能用。

在測試時,卻發現有時後可以,有時後不行,仔細比對操作方式,發現了為何會有這種狀況。

Teams的會議有分頻道會議跟一般會議,發起會議的地方在不同的頁面上,通常發起會議都是頻道會議,因為登入後的畫面就是會在發起頻道會議的地方。

1.在"團隊"裡建立的會議,不管是排程或立即開會,都是頻道會議。來賓是無法使用文字聊天。

2.在"行事曆"裡建立的會議,不管是排程或立即開會,都是一般會議。來賓是可以使用文字聊天。

其他差異可參考 https://atlas.utdallas.edu/TDClient/30/Portal/KB/ArticleDet?ID=300





Guests in Teams meetings are unable to chat via text.

Originally, during Teams meetings, guests without an account could also engage in text chat using the "Chat" feature. However, recently this capability suddenly became unavailable.

During testing, it was observed that sometimes it worked, while other times it didn't. After carefully comparing the steps taken, the reason for this situation was identified.

Teams meetings can be categorized as channel meetings or regular meetings, and the location for initiating a meeting is different on the interface. Typically, meetings are initiated as channel meetings because upon logging in, the interface is directed to the channel meeting initiation section.

Meetings created within "Teams" are always channel meetings, regardless of whether they are scheduled or started immediately. Guests cannot use text chat in these meetings.

Meetings created within the "Calendar" are always regular meetings, regardless of whether they are scheduled or started immediately. Guests can use text chat in these meetings.




2023/06/16

Backup exec 伺服器的 Symantec\Backup Exec\BEDBG 資料夾內有很多佔容易的cab檔

 Backup exec 伺服器的C槽空間快不夠了,看了一下裡面的東西,發現 Backup exec 的程式資料夾中,其中一個BEDBG資料夾用了比較多空間,在裡面看到很多cab檔。

上網查了一下,這是 Backup exec 當掉後就會產生的dump檔,如果有需要查原因就可以去讀取這些cab檔。

不需要查的話,這些檔案就可以砍掉清空間。


The available disk space on the C drive of the Backup Exec server is running critically low. Upon investigating the contents, it was observed that the BEDBG folder within the Backup Exec program directory is consuming a considerable amount of space. Upon further inspection, it was discovered that the folder contains multiple CAB files.

After conducting research online, it was determined that these CAB files are generated as dump files by Backup Exec in the event of a system crash. These files can be accessed for troubleshooting purposes to identify the cause of the crash, if necessary.

If there is no need for further investigation, it is recommended to delete these files in order to reclaim disk space.


2023/06/14

HTTPS 網站的SSL 憑證發行者 變成 Kapersky

HTTPS網站的憑證發行者,通常都是顯示該憑證的發行商, 

但在某些網站查看憑證資訊時,發行者會變成Kapersky,在功能上沒影響,但不知為何會如此。

查了一下才發現,如果防毒軟體有啟用HTTPS的掃描檢查,防毒軟體就會安裝自己的憑證,以便檢查HTTPS傳輸。

如果把這個HTTPS加密傳輸的檢查關了,就不會有憑證發行者被換掉的狀況了。

卡巴斯基企業版的端點防護(KES)HTTPS加密傳輸掃描設定,是在一般設定中的網路設定裡,可以做啟用或關閉。




The issuer of an HTTPS website certificate typically displays the certificate's issuing authority. However, in some cases, when viewing the certificate information on certain websites, the issuer appears as "Kaspersky" instead. This does not affect the functionality of the certificate, but the reason behind this change is unclear.

Further investigation revealed that if antivirus software has enabled HTTPS scanning, it installs its own certificate to facilitate the scanning of HTTPS transmissions.

By disabling the inspection of encrypted HTTPS traffic, the situation of the certificate issuer being replaced can be avoided.

The setting for HTTPS encrypted transmission scanning in Kaspersky Endpoint Security (KES), the enterprise edition of Kaspersky, can be found in the general settings under network settings. It provides the option to enable or disable this feature.


2023/06/12

Shioaji 篩選 目前週選的TX代號

 現在選擇權代號通常會有當週,下週,跟月選3個合約,如果現在是第一週,就是有TX1,TX2,TXO,三個。只有第三週是2個(TXO跟TX4)。

目前的python語法裡TX是寫死的,每周要自己手動改,有點煩,所以就想了一個動判斷的語法,來抓今天是該是TX幾。

主要就是判斷連續兩週的合約有沒有值,如果都有的話,那TX就是比較小的那個。

像是TX1跟TX2都有值,那今天就會是TX1。

第三週因為是抓TXO跟TX4,但第四週也會有TXO跟TX4,所以這一個判斷要放在最後面才行,不然第四週會被先判斷成是TXO。

#抓當週的週選的TX代號
if api.Contracts.Options['TX1'] != None and api.Contracts.Options['TX2'] != None:
    TX = 'TX1'
    print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX2'] != None and api.Contracts.Options['TXO'] != None:
    TX = 'TX2'
    print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX4'] != None and api.Contracts.Options['TX1'] != None:
    TX = 'TX4'
    print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX4'] != None and api.Contracts.Options['TX5'] != None:
    TX = 'TX4'
    print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX5'] != None and api.Contracts.Options['TX1'] != None:
    TX = 'TX5'
    print(api.Contracts.Options[TX])
elif api.Contracts.Options['TXO'] != None and    api.Contracts.Options['TX4'] != None:
    TX = 'TXO'
    print(api.Contracts.Options[TX])