Popular Post FOXBI Posted August 17, 2018 Popular Post Share #1 Posted August 17, 2018 (edited) This post was recognized by Polanskiman! FOXBI was awarded the badge 'Great Content' and 5 points. Hello! I am xpenology user. And I am an IT engineer who creates shell scripts as hobbies. Please understand that it is written by a google translate site. because i’m korean who is not fluent in English. I created a tool to change cpu information for Xpenology’s users. Modify the actual cpu name and cores of your pc or server. Howto Run ============================================================= 1. Download attached file on your PC (ch_cpuinfo.tar) (ch_cpuinfo_en.tar) / (ch_cpuinfo_kr.tar is file for korean) 2. Upload file to your DSM location (by filestation, sftp, webdav etc....) 3. Connect to ssh by admin account. (dsm > control panel > terminal & snmp > terminal > enable ssh check) 4. Switch user to root: sudo su - (input admin password) 5. Change directory to where ch_cpuinfo.tar file is located: cd /volume1/temp 5-1. in another way, Download ch_cpuinfo.tar with wget wget https://github.com/FOXBI/ch_cpuinfo/releases/download/ch_cpuinfo/ch_cpuinfo.tar 6. Decompress file & check file: tar xvf ch_cpuinfo.tar ls -lrt (check root’s run auth) 7. Run to Binary file ./ch_cpuinfo or ./ch_cpuinfo.sh (If you use busybox in DSM 5.x, you can use it as a source file) 8. When you execute it, proceed according to the description that is output. 9. Check your DSM’s CPU name, CPU cores at “information center” made a video of the how to run ch_cpuinfo. Extra Action If you want to use ch_cpuinfo in your language Modify and use the LANG.txt file in the same path as ch_cpuinfo. It is possible to use after changing the English content of each variable after translation and changing the value of CUSTLANG in line 8 to Y. Sample image(by Google trans) ==================================================== Addtional, Adjust binary to excute file made by shc(http://www.datsi.fi.upm.es/~frosal) The tool does not inclue worms, bad code. If you want to edit the CPU information yourself manually, please refer to the contents below. ——————————————————————————————————————————————————————————————— Location : /usr/syno/synoman/webman/modules/AdminCenter Source : admin_center.js / admin_center.js.gz(above 6.2) Add Before -> if(Ext.isDefined(h.cpu_vendor)&&Ext.isDefined(h.cpu_family)&&Ext.isDefined(h.cpu_series)){ o.push([_T("status","cpu_model_name"),String.format("{0} {1} {2}",h.cpu_vendor,h.cpu_family,h.cpu_series)])} if(Ext.isDefined(h.cpu_cores)){o.push([_T("status","cpu_cores"),h.cpu_cores])} Add contents: h.cpu_vendor="Intel";h.cpu_family="Xeon";h.cpu_series="E3-1220 V3";h.cpu_cores="4 Cores (1 CPU/4 Cores | 4 Threads)"; h.cpu_detail="<a href='https://ark.intel.com/content/www/us/en/ark/search.html?_charset_=UTF-8&q=E3-1220 V3' target=_blank>detail</a>" Change contens: String.format("{0} {1} {2}",h.cpu_vendor,h.cpu_family,h.cpu_series) to String.format("{0} {1} {2} {3}",h.cpu_vendor,h.cpu_family,h.cpu_series,h.cpu_detail) ——————————————————————————————————————————————————————————————— Finally, All descriptions are based on version 6.2, and the actual executable file supports 5.x, 6.x and 7.x Publish the source through github(https://github.com/FOXBI/ch_cpuinfo). For versions DSM 6.x and later, you can use the binary as before. If you use busybox in DSM 5.x, you can use it as a source file(ch_cpuinfo.sh). Please contact me by comment or bug report, i’ll respond to you as much as possible within my ability. Test & Made Environment ———————————————————————————————————— Base Server : HP ML310e v2 gen8 + VMware ESXi 6.0 + RDM DSM : DSM 6.2.3-25426 Update 3 (DS3615xs) Base Server : HP ML310e v2 gen8 + VMware ESXi 6.0 DSM : DSM 7.0.1-42214 (DS3615xs) Base Server : HP ML310e v2 gen8 + VMware ESXi 6.0 DSM : DSM 7.0.1-42214 (DS918+) Base Server : HP ML310e v2 gen8 + VMware ESXi 6.0 DSM : DSM 6.2.4-25556 (DS3615xs) Base Server : Intel E5-2630 v2 + VMware ESXi 6.7u2 DSM : 6.2.2-24922 Update 2 (DS3617xs) ———————————————————————————————————— Change Log Update new version (ch_cpuinfo ver 4.2.0-r01) 2023.02.18 - Application of AMD's CPU information collection function improvement - xpenlib(cpu_info.sh) refered https://github.com/FOXBI/xpenlib/blob/main/cpu_info.sh Update new version (ch_cpuinfo ver 4.2.1-r01) 2023.03.05 - Fixed error when users of previous version perform redo with version 4.2.0-r01 (Thanks for the @Mentat report.) I am sorry for not being able to actively respond to your inquiries due to busy life. Thank you!! Have a nice day!! Cheer up!! We can do it!! Reduce activity & Stay home & Wear a Mask!! Let's overcome COVID-19 !! Let's pray and support together for the two countries where the earthquake caused great damage and many deaths and missing people. ============================================= Download links: ch_cpuinfo ver 4.2.0-r01 - new version update -> ch_cpuinfo ver 4.2.1-r01 - new version update -> ch_cpuinfo.tar Reference images # 1.04b + DS918+ # 1.03b + DS3615xs # 1.03b + DS3617xs # Normal output is possible even when using more than 8core. # Support DSM 7.x Spoiler ==================================================== Addtional, Adjust binary to excute file made by shc(http://www.datsi.fi.upm.es/~frosal) The tool does not inclue worms, bad code. If you want to edit the CPU information yourself manually, please refer to the contents below. ——————————————————————————————————————————————————————————————— Location : /usr/syno/synoman/webman/modules/AdminCenter Source : admin_center.js / admin_center.js.gz(above 6.2) Add Before -> if(Ext.isDefined(f.cpu_vendor)&&Ext.isDefined(f.cpu_family)&&Ext.isDefined(f.cpu_series)){ o.push([_T("status","cpu_model_name"),String.format("{0} {1} {2}",f.cpu_vendor,f.cpu_family,f.cpu_series)])} if(Ext.isDefined(f.cpu_cores)){o.push([_T("status","cpu_cores"),f.cpu_cores])} Add contents: f.cpu_vendor="Intel";f.cpu_family="Xeon";f.cpu_series="E3-1230 V2";f.cpu_cores="1"; ——————————————————————————————————————————————————————————————— Finally, All descriptions are based on version 6.2, and the actual executable file supports both 5.x and 6.x. Please contact me by comment or bug report, i’ll respond to you as much as possible within my ability. Test & Made Environment ———————————————————————————————————— Base Server : HP Microserver gen8 + VMware ESXi 6.0 + RDM DSM : 6.2-23739 Update 2 (DS3615xs/DS3617xs) 6.1-15284 Update 2 (DS3615xs) ———————————————————————————————————— Thank you!! Have a nice day!! ============================================= Download links: ch_cpuinfo ver 1.0 - delete -> ch_cpuinfo_en.tar -> ch_cpuinfo_ko.tar ch_cpuinfo ver 3.0 - delete -> ch_cpuinfo_en.tar -> ch_cpuinfo_ko.tar ch_cpuinfo ver 4.0 - delete -> ch_cpuinfo_en.tar -> ch_cpuinfo_ko.tar ch_cpuinfo ver 5.0 - delete -> ch_cpuinfo_en.tar -> ch_cpuinfo_ko.tar ch_cpuinfo ver 5.2 - delete -> -> Update new version 2018.08.26 I made the tool by adding and improving the function. Please refer to above for how to use it. I delete the old version attached files, new version uploaded and attached. If you use last version tool, you can use without restore. Additional, It does not yet apply to "mobile web" and "DS finders". it's working.... and... Polanskiman give editable permission to me. so, i can do first article.. thanks Polanskiman !!! ============================================================================ Update new version (ch_cpuinfo ver 4.0) 2018.09.13 1. Mobile support (just 6.x / not yet 5.x) You can see it when you go into mobile browser or "DS mobile" menu in "DS Finder" 2. Improved CPU information collection command Some dmidecode commands have been found to be missing information and have been improved.(Thanks stefauresi !!! ) 3. Edited some variable names I adjusted some inconsistently coded variables Addtional, Usage is the same as before. and Existing users can apply by "2) Rerun". Unfortunately, DS Finder's own app does not reflect system information. It seems to refer to other information and it seems to have to study more. I checked as much as I could ... There may be errors found. Let me know in that time and I will reflect it If you want to edit the CPU information yourself manually, please refer to the contents below. ——————————————————————————————————————————————————————————————— Location : /usr/syno/synoman/mobile/ui (6.x), /usr/syno/synoman/webman/mapp(not yet 5.x) Source : mobile.js / mobile.js.gz(above 6.2) {name: "model",label: _T("common", "ds_model")}, -> Add Back Add Contents: {name: "cpu_series",renderer: function(value){var cpu_vendor="Intel";var cpu_family="Xeon";var cpu_series="E3-1230 V2";var cpu_cores="1"; return Ext.String.format('{0} {1} {2} ({3}Core)', cpu_vendor, cpu_family, cpu_series, cpu_cores);},label: _T("status", "cpu_model_name")}, ——————————————————————————————————————————————————————————————— ============================================================================ Update new version (ch_cpuinfo ver 5.0) 2018.10.30 1. Improved CPU information collection command (Thanks to gericb, Vileserver) Change to pure core value without applying thread, and For Native H/W users, changed to display the number of cpus, the number of cores per cpu, and the number of threads. ## Vmware 1 CPU / 1 Core Setting ## Vmware 1CPU / 2Core Setting ## ex. 1 CPU 1 Core Not support HT -> 1 Core (1 CPU | 1 Thread) 1 CPU 2 Core Support HT -> 2 Cores(1 CPU/2 Cores | 4 Threads) 2 CPU 4 Core Support HT -> 8 Cores(2 CPUs/4 Cores | 16 Threads) Addtional, Let me give you my excuse.... Where I work I count the number of threads by the number of logical cores. It was a habit of judging it because of work, so I was able to display the total number of cores without any thought. I apologize for the wrong information. Core information collection method, please refer to the contents below. ============================================================================================ ## before cat /proc/cpuinfo | grep "processor" | wc -l ## After(The result of the following command is combined and dispalyed.) cat /proc/cpuinfo | grep "processor" | sort -u | wc -l cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l cat /proc/cpuinfo | grep "core id" | sort -u | wc -l cat /proc/cpuinfo | grep "siblings" | sort -u | awk '{print $NF}' cat /proc/cpuinfo | grep "cpu cores" | sort -u | awk '{print $NF}' Update new version (ch_cpuinfo ver 5.2) 2018.12.07 1. Use bash change to sh (for compatibility with DSM 5.x version) #!/bin/bash change to #!/bin/sh 2. Publish the source through github(https://github.com/FOXBI/ch_cpuinfo). For versions DSM 6.x and later, you can use the binary as before. If you use busybox in DSM 5.x, you can use it as a source file(ch_cpuinfo.sh). ============================================================================================ Reference images 1) First run 2) Redi 3) Restore 4) Mobile View ====================================================================== Update new version (ch_cpuinfo ver 1.1.0-r01) 2019.08.06 1. Support DSM 6.2.2-24922 Update 2 2. Consolidate and change to run in accordance with used DSM language environment(Only One File) 3. Add link for cpu detail information(Intel, AMD Site Link) - Support above version 6.x Update new version (ch_cpuinfo ver 2.1.1-r01) 2020.04.27 1. Support DSM 6.2.3-25423 2. Change of CPU information collection method, Collect using only /proc/cpuinfo. Do not use dmidecode(for systems without dmidecode commands ...) 3. Support MultiLanguage(User can modify LANG.txt and apply it) Maintaining Korean / English support by default 4. undefined error fixed(2020-04-29) I didn't know if the keyword to search for was changed in 6.2.3-25423, but it was checked and fixed while debugging through error reporting. Thanks!! Update new version (ch_cpuinfo ver 2.4.1-r01) 2021.06.19 - CPU information gathering method change for AMD CPU ex. sed: -e expression #1, char 40: unterminated `s' command Unlike Intel, AMD reconfirmed and corrected errors in the process of gathering and sorting information. I don't know the exact result because I don't use AMD, so I think the error was caused by making the source. I'm so sorry for any inconvenience caused to AMD users. I hope this version goes well Update new version (ch_cpuinfo ver 2.5.2-r01) 2021.06.21 - CPU information gathering method change for AMD/Intel(ES/Unkown) CPU - In the case of AMD, the full name is output, and the ES CPU or Unkown CPU has been modified so that it can be output without error. - In addition, it has been modified to respond to the phenomenon that two lines of CPU information are output and errors occur. Thanks @Arithon for sharing the error information. I hope this version goes well Update new version (ch_cpuinfo ver 3.1.1-r01) 2021.09.26 - Support DSM 7.x above - admin_center.js file sedding method add - Application of ch_cpuinfo was confirmed only in 918+. In DS3615, the information page does not appear at all, so I can't check it, but I don't know why. Update new version (ch_cpuinfo ver 3.3.1-r01) 2021.09.30 - After executing ch_cpuinfo, add the current CPU information output before applying - Application of ch_cpuinfo was confirmed 3615, 918+. Update new version (ch_cpuinfo ver 3.3.1-r01) 2021.09.30 - After executing ch_cpuinfo, add the current CPU information output before applying - Application of ch_cpuinfo was confirmed 3615, 918+. Update new version (ch_cpuinfo ver 4.0.0-r01) 2023.02.11 - Added intel/AMD cpu information collection function (generation output) - Changed the method of collecting cpu information - xpenlib(cpu_info.sh) refered https://github.com/FOXBI/xpenlib/blob/main/cpu_info.sh - Non-Intel/AMD CPUs are also displayed. (eg. ARMv7 ) - New to AMD's Detail link page. - Changed to link to Intel's accurate information page. - Intel 12th gen support enable Update new version (ch_cpuinfo ver 4.1.1-r01) 2023.02.17 - Support for changing CPU information in Surveillance Station System information (User requests on github [Not work in Surveillance Station #34]) Tested DSM 7.x version & Surveillance Station 6.0.3-4473 - Modified work result comments (output when using Surveillance Station) - Updated LANG.txt - Add Updated date & Comment - Updated README.md Edited March 6, 2023 by FOXBI image edit 32 22 Quote Link to comment Share on other sites More sharing options...
amanx Posted August 20, 2018 Share #2 Posted August 20, 2018 it's work many thanks 1 Quote Link to comment Share on other sites More sharing options...
flyride Posted August 21, 2018 Share #3 Posted August 21, 2018 Thank you, however: Can you publish your source script? I assumed you were loading node.js to run the javascript code, but I am not sure how that could be compiled into an executable file with shc. I do not understand why you prefer to distribute as an executable file, seems a risk for others to accept this. 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted August 21, 2018 Author Share #4 Posted August 21, 2018 (edited) 2 hours ago, flyride said: Thank you, however: Can you publish your source script? I assumed you were loading node.js to run the javascript code, but I am not sure how that could be compiled into an executable file with shc. I do not understand why you prefer to distribute as an executable file, seems a risk for others to accept this. Thanks for the advice. First, This is the system bash shell script, not node.js or javascript. The reason I made this tool binary is that most DSM users do not understand the shell script, so to minimize the possibility of malfunction caused by mistake. Also, I am not a professional developer, so I was embarrassed to publish a script that was made inexact. For that reason, I uploaded it as an executable file, and I thought enough about what could be misunderstood as an executable. It is up you to decide whether to believe or not. If you like, publishing the source is not difficult. Please refer to the following. Instead, please do not blame me for not making it. Spoiler #!/bin/bash # Ver 1.0 2018.08.17 Made by FOXBI # ============================================================================== # Y or N Function # ============================================================================== READ_YN () { # $1:question $2:default read -n1 -p "$1" Y_N case "$Y_N" in y) Y_N="y" echo -e "\n" ;; n) Y_N="n" echo -e "\n" ;; q) echo -e "\n" exit 0 ;; *) echo -e "\n" ;; esac } # ============================================================================== # Process Function # ============================================================================== PREPARE_FN () { if [ -f "$WORK_DIR/admin_center.js" ] then if [ "$direct_job" == "y" ] then echo "warning!! Work directly on the original file without backup.\n" else tar -cf $BKUP_DIR/$TIME/admin_center.tar admin_center.js* fi if [ "$MA_VER" -eq "6" ] && [ "$MI_VER" -ge "2" ] then mv $WORK_DIR/admin_center.js.gz $BKUP_DIR/ cd $BKUP_DIR/ gzip -df $BKUP_DIR/admin_center.js.gz else cp -Rf $WORK_DIR/admin_center.js $BKUP_DIR/ fi else COMMENT08_FN exit 0 fi } GATHER_FN () { cpu_vendor=`dmidecode -t processor | grep Version | grep -v Unknown | sort -u | sed "s/(.)//g" | sed "s/(..)//g" | sed "s/CPU//g" | awk '{print $2}'` cpu_family=`dmidecode -t processor | grep Version | grep -v Unknown | sort -u | sed "s/(.)//g" | sed "s/(..)//g" | sed "s/CPU//g" | awk '{print $3}'` if [ "$cpu_vendor" == "AMD" ] then cpu_series=`dmidecode -t processor | grep Version | grep -v Unknown | grep -v Not | sort -u | sed "s/(.)//g" | sed "s/(..)//g" | sed "s/CPU//g" | awk -F "Version: " '{ print $2 }' | awk -F "Processor" '{ print $1 }'` else cpu_series=`dmidecode -t processor | grep Version | grep -v Unknown | grep -v Not | sort -u | sed "s/(.)//g" | sed "s/(..)//g" | sed "s/CPU//g" | awk '{ if (index($5,"@")!=0) { print $4 } else { print $4" "$5 } }'` fi cpu_cores=`cat /proc/cpuinfo | grep processor| wc -l` } PERFORM_FN () { if [ -f "$BKUP_DIR/admin_center.js" ] then if [ "$MA_VER" -ge "6" ] then cpu_info=`echo "f.cpu_vendor=\"${cpu_vendor}\";f.cpu_family=\"${cpu_family}\";f.cpu_series=\"${cpu_series}\";f.cpu_cores=\"${cpu_cores}\";"` sed -i "s/f.model]);/f.model]);${cpu_info}/g" $BKUP_DIR/admin_center.js else if [ "$MI_VER" -gt "0" ] then cpu_info=`echo "b.cpu_vendor=\"${cpu_vendor}\";b.cpu_family=\"${cpu_family}\";b.cpu_series=\"${cpu_series}\";b.cpu_cores=\"${cpu_cores}\";"` else cpu_info=`echo "b.cpu_vendor=\"${cpu_vendor}\";b.cpu_family=\"${cpu_family}${cpu_series}\";b.cpu_cores=\"${cpu_cores}\";"` fi sed -i "s/b.model]);/b.model]);${cpu_info}/g" $BKUP_DIR/admin_center.js fi else COMMENT08_FN exit 0 fi } APPLY_FN () { if [ -f "$BKUP_DIR/admin_center.js" ] then cp -Rf $BKUP_DIR/admin_center.js $WORK_DIR/ if [ "$MA_VER" -eq "6" ] && [ "$MI_VER" -ge "2" ] then gzip $BKUP_DIR/admin_center.js mv $BKUP_DIR/admin_center.js.gz $WORK_DIR/ fi else COMMENT08_FN exit 0 fi } RECOVER1_FN () { if [ "$Y_N" == "y" ] then RECOVER2_FN elif [ "$Y_N" == "n" ] then echo "No recovery was performed." else COMMENT10_FN fi } RECOVER2_FN () { if [ -d "$BKUP_DIR/$TIME" ] then cd $WORK_DIR tar -xf $BKUP_DIR/$TIME/admin_center.tar if [ "$re_check" == "y" ] then echo -e "Restore to source and continue.\n" else COMMENT09_FN fi else COMMENT08_FN exit 0 fi } EXEC_FN () { if [ -d $WORK_DIR ] then READ_YN "Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : " if [ "$Y_N" == "y" ] then mkdir -p $BKUP_DIR/$TIME cd $WORK_DIR if [ "$re_check" == "y" ] then RECOVER2_FN fi PREPARE_FN GATHER_FN PERFORM_FN APPLY_FN COMMENT09_FN elif [ "$Y_N" == "n" ] then READ_YN "Proceed with original file backup and preparation.. If you select n, Work directly on the original file. (Cancel : q) [y/n] : " if [ "$Y_N" == "y" ] then mkdir -p $BKUP_DIR/$TIME cd $WORK_DIR if [ "$re_check" == "y" ] then RECOVER2_FN fi PREPARE_FN elif [ "$Y_N" == "n" ] then direct_job=y mkdir -p $BKUP_DIR PREPARE_FN else COMMENT10_FN fi READ_YN "CPU name, Core count and reflects it. If you select n, Resote original file (Cancel : q) [y/n] : " if [ "$Y_N" == "y" ] then GATHER_FN PERFORM_FN APPLY_FN COMMENT09_FN elif [ "$Y_N" == "n" ] then if [ -d "$BKUP_DIR" ] then gzip $BKUP_DIR/admin_center.js mv $BKUP_DIR/admin_center.js.gz $WORK_DIR/ else COMMENT07_FN fi else COMMENT10_FN fi else COMMENT10_FN fi else COMMENT08_FN fi } COMMENT07_FN () { echo "No execution history. Please go back to the first run." exit 0 } COMMENT08_FN () { echo "The target file(location) does not exist. Please run again after checking." exit 0 } COMMENT09_FN () { echo "The operation is complete!! It takes about 1-2 minutes to reflect, please refresh the DSM page with F5 and check the information." exit 0 } COMMENT10_FN () { echo "Only y / n / q can be input. Please proceed again." exit 0 } # ============================================================================== # Main Progress # ============================================================================== clear TIME=`date +%Y%m%d%H%M%S` WORK_DIR="/usr/syno/synoman/webman/modules/AdminCenter" BKUP_DIR="/root/Xpenology_backup" VER_DIR="/etc.default" if [ -d "$VER_DIR" ] then VER_FIL="$VER_DIR/VERSION" else VER_FIL="/etc/VERSION" fi if [ -f "$VER_FIL" ] then MA_VER=`cat $VER_FIL | grep majorversion | awk -F \= '{print $2}' | sed 's/\"//g'` MI_VER=`cat $VER_FIL | grep minorversion | awk -F \= '{print $2}' | sed 's/\"//g'` else COMMENT08_FN fi if [ "$MA_VER" -gt "4" ] then echo "Your version of DSM is \033[0;34mDSM \033[0;31m"$MA_VER"."$MI_VER"\033[0;32m continue...\n" else echo "DSM version less than 5 is not supported. End the process." exit 0 fi read -n1 -p "1) First run 2) Redo 3) Restore - Select Number : " inst_z case "$inst_z" in 1) inst_check=install echo -e "\n " ;; 2) inst_check=reinstall echo -e "\n " ;; 3) inst_check=recovery echo -e "\n " ;; *) echo -e "\n" ;; esac if [ "$inst_check" = "reinstall" ] then READ_YN "Do you want to proceed again? Restore to original file backup and proceed.(Cancel : q) [y/n] : " inst_check=install re_check=y if [ -d "$BKUP_DIR" ] then TIME=`ls -l $BKUP_DIR/ | grep ^d | awk '{print $9}' | head -1` else COMMENT07_FN exit 0 fi if [ "$Y_N" == "y" ] then EXEC_FN elif [ "$Y_N" == "n" ] then echo "Do not proceed with the redo." else COMMENT10_FN fi elif [ "$inst_check" = "recovery" ] then READ_YN "Do you want to restore using the original backup file? (Cancel : q) [y/n] : " re_check=n if [ -d "$BKUP_DIR" ] then TIME=`ls -l $BKUP_DIR/ | grep ^d | awk '{print $9}' | head -1` else COMMENT07_FN exit 0 fi RECOVER1_FN elif [ "$inst_check" = "install" ] then re_check=n EXEC_FN else echo "Please select the correct number." fi Edited August 21, 2018 by Polanskiman Added code tag 2 Quote Link to comment Share on other sites More sharing options...
flyride Posted August 21, 2018 Share #5 Posted August 21, 2018 Ah, you are editing the Syno JavaScript file where the information is hardcoded. Thanks for posting it! 1 Quote Link to comment Share on other sites More sharing options...
Polanskiman Posted August 22, 2018 Share #6 Posted August 22, 2018 Small note. This will not survive even a critical update so this script should be run each time there is a DSM update. 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted August 22, 2018 Author Share #7 Posted August 22, 2018 (edited) 1 hour ago, Polanskiman said: Small note. This will not survive even a critical update so this script should be run each time there is DSM update. thank you "Polanskiman" for the information !! Additional, Taking the DS3615xs's update as an example.. if the update package file "synology_bromolow_3615xs.pat" contains "dsm-AdminCenter-bromolow-bin_6.2-23739-s2_all.deb", "admin_center.js, admin_center.gz.js" files in the *.deb will overwrite the modified files as posted by "Polanskiman", and the contents of the CPU information will be replaced with the original contents. Easy!! You just have to do it again. Warnning!! If you run this tool and update it, and the CPU info has changed to the original info, 1st, delete location "/root/Xpenology" 2nd, please do not select 2) Redo and select 1) First Run. Because, If you choose 2) Redo, you will be restoring to the pre-patch version. I will reflect the contents when revising the next version. Edited August 22, 2018 by FOXBI add comment Quote Link to comment Share on other sites More sharing options...
ihongyi Posted August 26, 2018 Share #8 Posted August 26, 2018 I have obtained root privileges to run ./ch_cpuin f o prompt -ash: ./ch_cpuinfo: Permission denied 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted August 27, 2018 Author Share #9 Posted August 27, 2018 13 hours ago, ihongyi said: I have obtained root privileges to run ./ch_cpuin f o prompt -ash: ./ch_cpuinfo: Permission denied Check your uploaded file permission If Permission is not"rwxr-xr-x" or "rwx--x--x", you can be change 755 or 777 by "chmod" command. Quote Link to comment Share on other sites More sharing options...
ihongyi Posted August 27, 2018 Share #10 Posted August 27, 2018 Just change the permissions and it will be fine。 1 Quote Link to comment Share on other sites More sharing options...
stefauresi Posted September 11, 2018 Share #11 Posted September 11, 2018 (edited) Hi, After run ./ch_cpuinfo In DSM info : CPU name = nothing CPU cores = 6 My CPU : Intel(R) Core(TM) i5-8600 CPU @ 3.10GHz After reboot : CPU info has changed to the original info 😥 Edited September 11, 2018 by stefauresi 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted September 12, 2018 Author Share #12 Posted September 12, 2018 10 hours ago, stefauresi said: Hi, After run ./ch_cpuinfo In DSM info : CPU name = nothing CPU cores = 6 My CPU : Intel(R) Core(TM) i5-8600 CPU @ 3.10GHz After reboot : CPU info has changed to the original info 😥 Please let me know the result of the commands below. dmidecode -t processor and cat /proc/cpuinfo Quote Link to comment Share on other sites More sharing options...
stefauresi Posted September 12, 2018 Share #13 Posted September 12, 2018 root@DiskStation:~# dmidecode -t processor # dmidecode 2.12 # No SMBIOS nor DMI entry point found, sorry. and root@DiskStation:~#cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 158 model name : Intel(R) Core(TM) i5-8600 CPU @ 3.10GHz stepping : 10 microcode : 0x96 cpu MHz : 3095.998 cache size : 9216 KB physical id : 0 siblings : 6 core id : 0 cpu cores : 6 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat invpcid_single pln pts dtherm hwp hwp_notify hwp_act_window hwp_epp intel_pt rsb_ctxsw retpoline tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 bugs : cpu_meltdown spectre_v1 spectre_v2 bogomips : 6191.99 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted September 12, 2018 Author Share #14 Posted September 12, 2018 7 hours ago, stefauresi said: root@DiskStation:~# dmidecode -t processor # dmidecode 2.12 # No SMBIOS nor DMI entry point found, sorry. and root@DiskStation:~#cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 158 model name : Intel(R) Core(TM) i5-8600 CPU @ 3.10GHz stepping : 10 microcode : 0x96 cpu MHz : 3095.998 cache size : 9216 KB physical id : 0 siblings : 6 core id : 0 cpu cores : 6 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 22 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat invpcid_single pln pts dtherm hwp hwp_notify hwp_act_window hwp_epp intel_pt rsb_ctxsw retpoline tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 bugs : cpu_meltdown spectre_v1 spectre_v2 bogomips : 6191.99 clflush size : 64 cache_alignment : 64 address sizes : 39 bits physical, 48 bits virtual power management: Thank you. I found out what the problem was because of the results you showed. I will upload and update soon. After that, your machine will be able to see cpu info. 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted September 13, 2018 Author Share #15 Posted September 13, 2018 On 8/17/2018 at 11:41 PM, FOXBI said: ch_cpuinfo ver 4.0 - update new version -> ch_cpuinfo_en.tar -> ch_cpuinfo_ko.tar I uploaded a new version file that supports mobile. It's possible to use !! 1 Quote Link to comment Share on other sites More sharing options...
stefauresi Posted September 13, 2018 Share #16 Posted September 13, 2018 Hi, It's Good Thx 1 Quote Link to comment Share on other sites More sharing options...
M3kk Posted September 13, 2018 Share #17 Posted September 13, 2018 Working nice. Thank you. 1 Quote Link to comment Share on other sites More sharing options...
sunfishdied Posted September 14, 2018 Share #18 Posted September 14, 2018 It's working , thanks 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 14, 2018 Share #19 Posted September 14, 2018 Works perfectly on Proliant Gen8 with Xeon 1230 V2. Thank you so much for this useful utility. Etienne Quote Link to comment Share on other sites More sharing options...
gericb Posted September 15, 2018 Share #20 Posted September 15, 2018 (edited) Hey there - THANK YOU SO MUCH FOR MAKING THIS POSSIBLE! It's been one of those little annoying things there was never a resolution for, until you worked your MAGIC! Seems like there might still be some bugs, with the CPU SPEED and number of CORES. Image #1:Original Info Center Image #2:After running ch_cpuinfo Image #3: BIOS Info Image #4: Mobile Info Center Spoiler root@CentralNAS:/volume1/homes/admin/shc-3.8.9b# dmidecode -t processor # dmidecode 2.12 # SMBIOS entry point at 0x000f0000 SMBIOS 2.7 present. Handle 0x005E, DMI type 4, 42 bytes Processor Information Socket Designation: CPU 1 Type: Central Processor Family: Core i3 Manufacturer: Intel(R) Corporation ID: A9 06 03 00 FF FB EB BF Signature: Type 0, Family 6, Model 58, Stepping 9 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) DS (Debug store) ACPI (ACPI supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) SS (Self-snoop) HTT (Multi-threading) TM (Thermal monitor supported) PBE (Pending break enabled) Version: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz Voltage: 2.9 V External Clock: 100 MHz Max Speed: 3300 MHz Current Speed: 3300 MHz Status: Populated, Enabled Upgrade: Socket BGA1155 L1 Cache Handle: 0x003A L2 Cache Handle: 0x003B L3 Cache Handle: 0x003C Serial Number: Not Specified Asset Tag: Fill By OEM Part Number: Fill By OEM Core Count: 2 Core Enabled: 2 Thread Count: 4 Characteristics: 64-bit capable root@CentralNAS:/volume1/homes/admin/shc-3.8.9b# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 58 model name : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz stepping : 9 microcode : 0x19 cpu MHz : 3292.436 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms bogomips : 6584.87 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 58 model name : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz stepping : 9 microcode : 0x19 cpu MHz : 3292.436 cache size : 3072 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 2 apicid : 2 initial apicid : 2 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms bogomips : 6584.87 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 2 vendor_id : GenuineIntel cpu family : 6 model : 58 model name : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz stepping : 9 microcode : 0x19 cpu MHz : 3292.436 cache size : 3072 KB physical id : 0 siblings : 4 core id : 0 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms bogomips : 6584.87 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 3 vendor_id : GenuineIntel cpu family : 6 model : 58 model name : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz stepping : 9 microcode : 0x19 cpu MHz : 3292.436 cache size : 3072 KB physical id : 0 siblings : 4 core id : 1 cpu cores : 2 apicid : 3 initial apicid : 3 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms bogomips : 6584.87 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: I hope you find this helpful/useful! If there is anything I can do to help, please let me know! Thank You Edited May 29, 2019 by Polanskiman Added log to spoiler code. 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted September 16, 2018 Author Share #21 Posted September 16, 2018 16 hours ago, gericb said: Seems like there might still be some bugs, with the CPU SPEED and number of CORES. Image #1:Original Info Center Image #2:After running ch_cpuinfo Image #3: BIOS Info Image #4: Mobile Info Center First, find by ark.intel.com site. # i3-3220 -> of Core: 2 / of Threads: 4 / Frequency : 3.30Ghz # i3-4130 -> of Core: 2 / of Threads: 4 / Frequency : 3.40Ghz Compared to the results you showed, I do not mind the number of cores, but I think Frequency needs to be checked. Image #3 Bios Info Core Count = 2 / HT Capable = yes -> Total Logical Cores is 4. I do not know if your Xpenology environment is Native or VM, but generally the total number of cores is determined by the number of logical cores. Your i3-3220 looks normal. As with the /proc/cpuinfo output (processor 0 to 3, total count 4). However, i3-4130 is 2Core, HT is disabled or VM is likely to have allocated 2Core. In case of Frequency, I decided that my CPU is E3-1230 V2 and it is normal. It looks like your i3-4130 result shows a fixed value at the time of disconnection. Please check it again and show me the i3-4130's cpuinfo, dmidecode. Your information will be of great help. Thank you !! Quote Link to comment Share on other sites More sharing options...
gericb Posted September 16, 2018 Share #22 Posted September 16, 2018 20 minutes ago, FOXBI said: First, find by ark.intel.com site. # i3-3220 -> of Core: 2 / of Threads: 4 / Frequency : 3.30Ghz # i3-4130 -> of Core: 2 / of Threads: 4 / Frequency : 3.40Ghz Compared to the results you showed, I do not mind the number of cores, but I think Frequency needs to be checked. Image #3 Bios Info Core Count = 2 / HT Capable = yes -> Total Logical Cores is 4. I do not know if your Xpenology environment is Native or VM, but generally the total number of cores is determined by the number of logical cores. Your i3-3220 looks normal. As with the /proc/cpuinfo output (processor 0 to 3, total count 4). However, i3-4130 is 2Core, HT is disabled or VM is likely to have allocated 2Core. In case of Frequency, I decided that my CPU is E3-1230 V2 and it is normal. It looks like your i3-4130 result shows a fixed value at the time of disconnection. Please check it again and show me the i3-4130's cpuinfo, dmidecode. Your information will be of great help. Thank you !! But it's wrong though. In Image #2, 4 it's showing 4 cores, which isn't correct as validated by Image #3 directly from the BIOS. This is a bare metal install, no VM, no HT option to enable/disable. The i3-4130 is the default CPU info from the DS3615xs, my system is the i3-3220 (BIOS image #3). But CORES and THREADS are different, not the same. Seems you are display for CORES, the what is actually the THREADS. As far as the CPU frequency goes, 3.29Ghz where is it getting that from, since it should be 3.30Ghz and none of the command line data or BIOS indicates that value. 🤔 Do I make sense? 🤓 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted September 16, 2018 Author Share #23 Posted September 16, 2018 23 minutes ago, gericb said: But it's wrong though. In Image #2, 4 it's showing 4 cores, which isn't correct as validated by Image #3 directly from the BIOS. This is a bare metal install, no VM, no HT option to enable/disable. The i3-4130 is the default CPU info from the DS3615xs, my system is the i3-3220 (BIOS image #3). But CORES and THREADS are different, not the same. Seems you are display for CORES, the what is actually the THREADS. As far as the CPU frequency goes, 3.29Ghz where is it getting that from, since it should be 3.30Ghz and none of the command line data or BIOS indicates that value. 🤔 Do I make sense? 🤓 OMG!!! I’m so sorry... I was completely forgetting the basic information of the DS3615xs. I also seem to have misunderstood the intent of the question. Please understand my mistakes and forgive me if the my reply is rude. The number of cores was determined only by the total number of processors on cpuinfo. I'll try to think more about the core. Thank you Quote Link to comment Share on other sites More sharing options...
gericb Posted September 16, 2018 Share #24 Posted September 16, 2018 27 minutes ago, FOXBI said: OMG!!! I’m so sorry... I was completely forgetting the basic information of the DS3615xs. I also seem to have misunderstood the intent of the question. Please understand my mistakes and forgive me if the my reply is rude. The number of cores was determined only by the total number of processors on cpuinfo. I'll try to think more about the core. Thank you FOXBI! You are TOTALLY making us happy, I have been wanting to change this CPU INFO forever, so you're hard work in finding where it is, and how to change it - IS WONDERFUL!!! if you search through the forum, you will see many people regularly say that it "could not be changed, as it was hard coded..." and you have clearly proved these statements to be totally uneducated and wrong. I appreciate your work, you are in no way rude or need any forgiveness, you are making great things happen!! 😎 Just trying to help you as best I can, I APPRECIATE you and your creativity/work. 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted September 16, 2018 Author Share #25 Posted September 16, 2018 23 minutes ago, gericb said: FOXBI! You are TOTALLY making us happy, I have been wanting to change this CPU INFO forever, so you're hard work in finding where it is, and how to change it - IS WONDERFUL!!! if you search through the forum, you will see many people regularly say that it "could not be changed, as it was hard coded..." and you have clearly proved these statements to be totally uneducated and wrong. I appreciate your work, you are in no way rude or need any forgiveness, you are making great things happen!! 😎 Just trying to help you as best I can, I APPRECIATE you and your creativity/work. Thanks gericb like the story of "praise makes whales dance," and I am grateful for your praise and support and I feel rewarding for this work. I will make continue something that a lot of people can sympathize with. And.. Considering your feedback, let's express a more advanced way to core in the next version. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.