ISAとかGCMV_20210313

GC解析参考 ローカルに建てたISAからjvmが起動しない。証明書やらホワイトリスト色々したが起動しない。 他の方法を模索した備忘録。

・検索キーワード:GC解析 ツール
・あなたの知らないJDKの便利ツールたち
https://www.atmarkit.co.jp/ait/articles/0811/13/news145.html
・GCMVを使ってGCログ解析してみよう
https://qiita.com/Kobecow/items/a0e9215c5ee5cc918b23
・EclipsePlugIn
https://marketplace.eclipse.org/content/ibm-monitoring-and-diagnostic-tools-garbage-collection-and-memory-visualizer-gcmv
Java開発の性能改善! その2 GCログの解析とHeapの設定
https://qiita.com/i_matsui/items/aabbdaa169c6ae51ecb3


◆その他
・検索キーワード:Javaの診断をIBMスタイルで
IBMおよびSAPがJVM診断ツールをオープンソース
https://www.infoq.com/jp/news/2007/12/ibm-sap/
・Health Center(IBM Java診断ツール)利用ガイド
https://public.dhe.ibm.com/software/dw/jp/websphere/was/hc_guide/healthcenter_guide_20121031.pdf


Apacheアクセスログ集計

Apache ログを awk と uniq だけで集計する - Qiita

grep 'May/2016' /var/log/httpd/access_log | awk '{print $4}' | cut -b 2-12 | sort | uniq -c          # 日別
grep '01/May/2016' /var/log/httpd/access_log | awk '{print $4}' | cut -b 2-15 | sort | uniq -c       # 時間別
grep '01/May/2016:01' /var/log/httpd/access_log | awk '{print $4}' | cut -b 2-18 | sort | uniq -c    # 分別
grep '01/May/2016:01:00' /var/log/httpd/access_log | awk '{print $4}' | cut -b 2-21 | sort | uniq -c # 秒別
[sone.ryota@esxi-ryo136 ~]$ grep '23/Nov/2020:14' /opt/redmine/apache2/logs/access_log |awk '{print $4}' |cut -b 2-18 |sort |uniq -c
     11 23/Nov/2020:14:31
      1 23/Nov/2020:14:32
[sone.ryota@esxi-ryo136 ~]$
echo "`date +'%Y-%m-%d_%H'` $*"
[sone.ryota@esxi-ryo136 ~]$ grep '23/Nov/2020:14' /opt/redmine/apache2/logs/access_log |awk '{print $4}' |cut -b 14-18 |sort |uniq -c
     11 14:31
      1 14:32
[sone.ryota@esxi-ryo136 ~]$

Outlook受信メールをCSV保存

Outlook受信メールをCSV保存する場合に受信時刻も保存する方法 - マイクロソフト コミュニティ

Bitnami Redmine(Linux版)復旧手順 - Qiita

■bitnami-redmine restore

●移行元からバックアップを転送


[root@vmp-ryo010 redmine]# scp ./redmine_backup-20201111184525.tar root@192.168.14.136:/root/mp-ryo010-redminebk
root@192.168.14.136's password: 
redmine_backup-20201111184525.tar  0%  0  0.0KB/s --:-- ETAredmine_backup-20201111184525.tar  100% 2650KB  52.2MB/s  00:00
[root@vmp-ryo010 redmine]# exit

●確認
[root@esxi-ryo136 ~]# ls -ltr /root/mp-ryo010-redminebk/*tar
-rw-r--r-- 1 root root 2713600 11月 11 18:48 /root/mp-ryo010-redminebk/redmine_backup-20201111184525.tar
[root@esxi-ryo136 ~]#

●展開
[root@esxi-ryo136 mp-ryo010-redminebk]# tar xvf redmine_backup-20201111184525.tar
redmine_backup-20201111184525/
redmine_backup-20201111184525/files/
redmine_backup-20201111184525/files/2020/
redmine_backup-20201111184525/files/2020/10/
redmine_backup-20201111184525/files/2020/10/201011013614_vmtmpexport01.png
redmine_backup-20201111184525/files/2020/10/201011013614_vmtmpexport01-done.png
redmine_backup-20201111184525/files/2020/09/
redmine_backup-20201111184525/files/2020/09/200920043053_61wl1QHFPtL._AC_SL1100_.jpg
redmine_backup-20201111184525/insert.sql
[root@esxi-ryo136 mp-ryo010-redminebk]#

mysql以外停止 ●mysqlデータインポート


[root@esxi-ryo136 ~]# /opt/redmine/mysql/bin/mysql -u {username*1} -p{password*2} {database*3} < /root/mp-ryo010-redminebk/redmine_backup-20201111184525/insert.sql
mysql.bin: [Warning] Using a password on the command line interface can be insecure.
[root@esxi-ryo136 ~]#

●添付ファイル移行


[root@esxi-ryo136 redmine_backup-20201111184525]# cp -rp ./files/* /opt/redmine/apps/redmine/htdocs/files

●他のサービスを起動して完了

*:{INSTALL_DIR}/apps/redmine/htdocs/config/database.yml production セクションの以下の値  *1: username  *2: password  *3: database

PowerShellのプロンプトを短く

PowerShellのプロンプトを短く

PS D:\OSS\MariaDB 10.4\include\mysql\server\private\atomic> hoge

見難い プロンプトを修正してカレントディレクトリのディレクトリ名だけを表示する

PS C:\WINDOWS\system32> Set-Alias vi 'D:\OSS\vim\vim.exe'
PS C:\WINDOWS\system32> $profile
C:\Users\{ユーザー名}\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
PS C:\WINDOWS\system32> vi $profile
#functiom{}を追加
function prompt() {
  (Split-Path (Get-Location) -Leaf) + "> "
  }
Set-Alias vi 'D:\OSS\vim\vim.exe'
#eof
Users> cd 'D:\OSS\MariaDB 10.4\include\mysql\server\private\atomic'
atomic>
atomic> pwd
Path
----
D:\OSS\MariaDB 10.4\include\mysql\server\private\atomic


atomic>  hoge

少し改造

PS C:\WINDOWS\system32> vi $profile
#functiom{}を追加
function prompt() {
#  (Split-Path (Get-Location) -Leaf) + "> "
  "[$($env:USERNAME)@$($env:COMPUTERNAME) " + (Split-Path (Get-Location) -Leaf) + "] > "
  }
Set-Alias vi 'D:\OSS\vim\vim.exe'
#eof

Set-Location "C:\Users{UserName}\Documents\GitHub"