FOXBI Posted December 8, 2018 Author Share #76 Posted December 8, 2018 On 11/25/2018 at 7:46 AM, fhocorp said: ash-4.3# Please run it as a new source file. I have solved the related problem. Quote Link to comment Share on other sites More sharing options...
Vileserver Posted December 8, 2018 Share #77 Posted December 8, 2018 4 hours ago, FOXBI said: Publish the source is not only here, but also through github(https://github.com/FOXBI/ch_cpuinfo). Oh, that's great that you shared your code on GitHub. Thank you! What a good idea. 4 hours ago, FOXBI said: For versions 6.x and later, you can use the binary as before. There is a version 6? It looks like the latest version is 5.2, no? Thanks again for your work 😊 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 8, 2018 Author Share #78 Posted December 8, 2018 1 hour ago, Vileserver said: There is a version 6? It looks like the latest version is 5.2, no? Sorry. As the number goes up, this situation occurs. DSM 6.x and ch_cpu info 5.2. I will correct it. Thank you!! Quote Link to comment Share on other sites More sharing options...
sd2d Posted December 8, 2018 Share #79 Posted December 8, 2018 49 minutes ago, FOXBI said: Sorry. As the number goes up, this situation occurs. DSM 6.x and ch_cpu info 5.2. I will correct it. Thank you!! ok, will try. 1 Quote Link to comment Share on other sites More sharing options...
nvrsk Posted December 8, 2018 Share #80 Posted December 8, 2018 On 8/17/2018 at 5:41 PM, FOXBI said: Update new version (ch_cpuinfo ver 5.2) 2018.12.07 works great on 5.2 now! thanks, man! DSM login/logout is a MUST to see the result. 1 1 Quote Link to comment Share on other sites More sharing options...
Xeno Posted December 8, 2018 Share #81 Posted December 8, 2018 Fantastic tool, awesomely cool. Thank you so much. 1 Quote Link to comment Share on other sites More sharing options...
fhocorp Posted December 10, 2018 Share #82 Posted December 10, 2018 (edited) DSM CPU Information Change Tool ver. 5.2 - made by FOXBI Your version of DSM is DSM 6.1 continue... 1) First run 2) Redo 3) Restore - Select Number : 2 Do you want to proceed again? Restore to original file backup and proceed.(Cance l : q) [y/n] : y You have verified and installed the previous version. Contiue... Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : y Restore to source and continue. sed: -e expression #1, char 37: unterminated `s' command sed: -e expression #1, char 91: unterminated `s' command The operation is complete!! It takes about 1-2 minutes to reflect, (Please refresh the DSM page with F5 or after logout/login and check the informa tion.) ash-4.3# Running DSM 6.1.7-15284 Update 2 Edited December 10, 2018 by fhocorp 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 11, 2018 Author Share #83 Posted December 11, 2018 7 hours ago, fhocorp said: DSM CPU Information Change Tool ver. 5.2 - made by FOXBI Your version of DSM is DSM 6.1 continue... 1) First run 2) Redo 3) Restore - Select Number : 2 Do you want to proceed again? Restore to original file backup and proceed.(Cance l : q) [y/n] : y You have verified and installed the previous version. Contiue... Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : y Restore to source and continue. sed: -e expression #1, char 37: unterminated `s' command sed: -e expression #1, char 91: unterminated `s' command The operation is complete!! It takes about 1-2 minutes to reflect, (Please refresh the DSM page with F5 or after logout/login and check the informa tion.) ash-4.3# Running DSM 6.1.7-15284 Update 2 I have made some parts of the old version of ch_cpuinfo that allow me to cope with the problem and some problems may arise. It is also a good idea to proceed after restoring the original with No. 3 restores. If you want to know more exactly where the error is, go to sh -x ch_cpuinfo.sh and show me the error detected part. Thank you Quote Link to comment Share on other sites More sharing options...
fhocorp Posted December 11, 2018 Share #84 Posted December 11, 2018 (edited) Hi. Thanks for your answer. Already tried option 3 but also not working. Here is the complete log : Spoiler ash-4.3# sh -x ch_cpuinfo_en.sh + ver=5.2 + clear + WORK_DIR=/usr/syno/synoman/webman/modules/AdminCenter + MWORK_DIR=/usr/syno/synoman/mobile/ui + BKUP_DIR=/root/Xpenology_backup + VER_DIR=/etc.default + cecho c 'DSM CPU Information Change Tool ver. \033[0;31m5.2\033[00m - made by FOXBI\n' + '[' -n '' ']' + bgcolor=0 + code='\033[' + case "$1" in + color='\033[0;36m' + text='\033[0;36mDSM CPU Information Change Tool ver. \033[0;31m5.2\033[00m - made by FOXBI\n\033[0m' + echo -e '\033[0;36mDSM CPU Information Change Tool ver. \033[0;31m5.2\033[00m - made by FOXBI\n\033[0m' DSM CPU Information Change Tool ver. 5.2 - made by FOXBI + '[' -d /etc.default ']' + VER_FIL=/etc/VERSION + '[' -f /etc/VERSION ']' ++ cat /etc/VERSION ++ grep majorversion ++ awk -F = '{print $2}' ++ sed 's/\"//g' + MA_VER=6 ++ cat /etc/VERSION ++ grep minorversion ++ awk -F = '{print $2}' ++ sed 's/\"//g' + MI_VER=1 ++ cat /etc/VERSION ++ grep buildnumber ++ awk -F = '{print $2}' ++ sed 's/\"//g' + BL_NUM=15284 ++ cat /etc/VERSION ++ grep smallfixnumber ++ awk -F = '{print $2}' ++ sed 's/\"//g' + BL_FIX=2 + BL_CHK=152842 ++ date +%Y%m%d%H%M%S + TIME=20181211100759_152842 + STIME=20181211100759_152842 + '[' 6 -gt 4 ']' + '[' 6 -eq 5 ']' + cecho g 'Your version of DSM is \033[0;36mDSM \033[0;31m6.1\033[0;32m continue...\033[00m\n' + '[' -n '' ']' + bgcolor=0 + code='\033[' + case "$1" in + color='\033[0;32m' + text='\033[0;32mYour version of DSM is \033[0;36mDSM \033[0;31m6.1\033[0;32m continue...\033[00m\n\033[0m' + echo -e '\033[0;32mYour version of DSM is \033[0;36mDSM \033[0;31m6.1\033[0;32m continue...\033[00m\n\033[0m' Your version of DSM is DSM 6.1 continue... + read -n1 -p '1) First run 2) Redo 3) Restore - Select Number : ' run_select 1) First run 2) Redo 3) Restore - Select Number : 2+ case "$run_select" in + run_check=redo + echo -e '\n ' + '[' redo == redo ']' + READ_YN 'Do you want to proceed again? Restore to original file backup and proceed.(Cancel : q) [y/n] : ' + read -n1 -p 'Do you want to proceed again? Restore to original file backup and proceed.(Cancel : q) [y/n] : ' Y_N Do you want to proceed again? Restore to original file backup and proceed.(Cancel : q) [y/n] : y+ case "$Y_N" in + Y_N=y + echo -e '\n' + '[' y == y ']' + re_check=y + BLCHECK_FN redo + bl_check=n + '[' -d /root/Xpenology_backup ']' ++ ls -l /root/Xpenology_backup/ ++ grep '^d' ++ wc -l + BK_CNT=1 + '[' 1 -gt 0 ']' ++ ls -l /root/Xpenology_backup/ ++ grep '^d' ++ grep 152842 ++ wc -l + BK_CNT=1 + '[' 1 -gt 0 ']' ++ ls -l /root/Xpenology_backup/ ++ grep '^d' ++ grep 152842 ++ awk '{print $9}' ++ head -1 + TIME=20181124234303_152842 ++ ls -l /root/Xpenology_backup/ ++ grep '^d' ++ grep -v 152842 ++ wc -l + BK_CNT=0 + '[' 0 -gt 0 ']' + '[' y == n ']' ++ ls -l /root/Xpenology_backup/ ++ grep '^d' ++ awk '{print $9}' ++ head -1 + STIME=20181124234303_152842 + BLSUB_FN redo ++ echo 20181124234303_152842 + TIME=20181124234303_152842 + '[' redo == run ']' + RERUN_FN redo + '[' redo == redo ']' + ls -l /root/Xpenology_backup/ + grep '^d' + grep -v 152842 + awk '{print "rm -rf /root/Xpenology_backup/"$9}' + sh + GATHER_FN + '[' -f /sbin/dmidecode ']' ++ dmidecode ++ grep SMBIOS ++ egrep 'NO|sorry' ++ wc -l + DMI_CHK=0 + '[' 0 -gt 0 ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ grep -v Not ++ awk '{print $2}' ++ sed 's/(.)//g' ++ sort -u ++ sed s/CPU//g + cpu_vendor=' Intel' + '[' ' Intel' == AMD ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ awk '{print $3}' ++ sed s/CPU//g ++ sed 's/(.)//g' ++ sort -u ++ grep -v Not + cpu_family=' Xeon' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ sed s/CPU//g ++ awk '{ if (index($5,"@")!=0) { print $4 } else { print $4" "$5 } }' ++ sed 's/(.)//g' ++ grep -v Not ++ sort -u + cpu_series=' E5440' ++ cat /proc/cpuinfo ++ grep '^physical id' ++ sort -u ++ wc -l + PICNT=1 ++ cat /proc/cpuinfo ++ grep '^core id' ++ sort -u ++ wc -l + CICNT=4 ++ cat /proc/cpuinfo ++ grep '^cpu cores' ++ sort -u ++ awk '{print $NF}' + CCCNT=4 ++ cat /proc/cpuinfo ++ grep '^siblings' ++ sort -u ++ awk '{print $NF}' + CSCNT=4 ++ cat /proc/cpuinfo ++ grep '^processor' ++ wc -l + THCNT=4 ++ cat /proc/cpuinfo ++ grep processor ++ wc -l + ODCNT=4 + '[' 4 -gt 0 ']' + '[' 1 == 0 ']' + '[' 1 -gt 1 ']' + TPCNT='1 CPU' + TCCNT=4 + '[' 4 -gt 1 ']' + TCCNT='4 Cores ' + '[' 4 -gt 1 ']' + PCCNT='\/4 Cores ' + '[' 4 -gt 1 ']' + TTCNT='4 Threads' + cpu_cores='4 Cores (1 CPU\/4 Cores | 4 Threads)' + '[' -f /usr/syno/synoman/webman/modules/AdminCenter/admin_center.js ']' + '[' -f /usr/syno/synoman/mobile/ui/mobile.js ']' ++ cat /usr/syno/synoman/webman/modules/AdminCenter/admin_center.js ++ grep '.model]);if(Ext.isDefined' ++ wc -l + info_cnt=1 ++ cat /usr/syno/synoman/mobile/ui/mobile.js ++ grep 'ds_model")},{name:"ram_size' ++ wc -l + info_cnt_m=1 + '[' 1 -eq 0 ']' + COMMENT05_FN + echo -e 'You have verified and installed the previous version. Contiue...\n' You have verified and installed the previous version. Contiue... + run_check=run + EXEC_FN + '[' -d /usr/syno/synoman/webman/modules/AdminCenter ']' + READ_YN 'Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : ' + read -n1 -p 'Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : ' Y_N Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : y+ case "$Y_N" in + Y_N=y + echo -e '\n' + '[' y == y ']' + mkdir -p /root/Xpenology_backup/20181124234303_152842 + '[' y == y ']' + '[' n == y ']' + RECOVER_FN + '[' -d /root/Xpenology_backup/20181124234303_152842 ']' + cd /usr/syno/synoman/webman/modules/AdminCenter + tar -xf /root/Xpenology_backup/20181124234303_152842/admin_center.tar + '[' -f /root/Xpenology_backup/20181124234303_152842/mobile.tar ']' + cd /usr/syno/synoman/mobile/ui + tar -xf /root/Xpenology_backup/20181124234303_152842/mobile.tar + '[' y == y ']' + echo -e 'Restore to source and continue.\n' Restore to source and continue. + PREPARE_FN + '[' -f /usr/syno/synoman/webman/modules/AdminCenter/admin_center.js ']' + '[' -f /usr/syno/synoman/mobile/ui/mobile.js ']' + '[' '' == y ']' + cd /usr/syno/synoman/webman/modules/AdminCenter + tar -cf /root/Xpenology_backup/20181124234303_152842/admin_center.tar admin_center.js + cd /usr/syno/synoman/mobile/ui + tar -cf /root/Xpenology_backup/20181124234303_152842/mobile.tar mobile.js + '[' 6 -eq 6 ']' + '[' 1 -ge 2 ']' + cp -Rf /usr/syno/synoman/webman/modules/AdminCenter/admin_center.js /root/Xpenology_backup/ + cp -Rf /usr/syno/synoman/mobile/ui/mobile.js /root/Xpenology_backup/ + GATHER_FN + '[' -f /sbin/dmidecode ']' ++ dmidecode ++ grep SMBIOS ++ egrep 'NO|sorry' ++ wc -l + DMI_CHK=0 + '[' 0 -gt 0 ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ grep -v Not ++ sed s/CPU//g ++ awk '{print $2}' ++ sed 's/(.)//g' ++ sed 's/(..)//g' ++ sort -u + cpu_vendor=' Intel' + '[' ' Intel' == AMD ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ grep -v Not ++ awk '{print $3}' ++ sed 's/(.)//g' ++ sed s/CPU//g ++ sort -u + cpu_family=' Xeon' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ sed s/CPU//g ++ sed 's/(.)//g' ++ awk '{ if (index($5,"@")!=0) { print $4 } else { print $4" "$5 } }' ++ grep -v Not ++ sort -u + cpu_series=' E5440' ++ cat /proc/cpuinfo ++ grep '^physical id' ++ sort -u ++ wc -l + PICNT=1 ++ cat /proc/cpuinfo ++ grep '^core id' ++ sort -u ++ wc -l + CICNT=4 ++ cat /proc/cpuinfo ++ grep '^cpu cores' ++ sort -u ++ awk '{print $NF}' + CCCNT=4 ++ cat /proc/cpuinfo ++ grep '^siblings' ++ sort -u ++ awk '{print $NF}' + CSCNT=4 ++ cat /proc/cpuinfo ++ grep '^processor' ++ wc -l + THCNT=4 ++ cat /proc/cpuinfo ++ grep processor ++ wc -l + ODCNT=4 + '[' 4 -gt 0 ']' + '[' 1 == 0 ']' + '[' 1 -gt 1 ']' + TPCNT='1 CPU' + TCCNT=4 + '[' 4 -gt 1 ']' + TCCNT='4 Cores ' + '[' 4 -gt 1 ']' + PCCNT='\/4 Cores ' + '[' 4 -gt 1 ']' + TTCNT='4 Threads' + cpu_cores='4 Cores (1 CPU\/4 Cores | 4 Threads)' + PERFORM_FN + '[' -f /root/Xpenology_backup/admin_center.js ']' + '[' -f /root/Xpenology_backup/mobile.js ']' + '[' 6 -ge 6 ']' ++ echo 'f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";' + cpu_info='f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";' + sed -i 's/f.model]);/f.model]);f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";/g' /root/Xpenology_backup/admin_center.js sed: -e expression #1, char 37: unterminated `s' command ++ echo '{name: "cpu_series",renderer: function(value){var cpu_vendor=" Intel";var cpu_family=" Xeon";var cpu_series=" E5440";var cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";return Ext.String.format('\''{0} {1} {2} [ {3} ]'\'', cpu_vendor, cpu_family, cpu_series, cpu_cores);},label: _T("status", "cpu_model_name")},' + cpu_info_m='{name: "cpu_series",renderer: function(value){var cpu_vendor=" Intel";var cpu_family=" Xeon";var cpu_series=" E5440";var cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";return Ext.String.format('\''{0} {1} {2} [ {3} ]'\'', cpu_vendor, cpu_family, cpu_series, cpu_cores);},label: _T("status", "cpu_model_name")},' + sed -i 's/"ds_model")},/"ds_model")},{name: "cpu_series",renderer: function(value){var cpu_vendor=" Intel";var cpu_family=" Xeon";var cpu_series=" E5440";var cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";return Ext.String.format('\''{0} {1} {2} [ {3} ]'\'', cpu_vendor, cpu_family, cpu_series, cpu_cores);},label: _T("status", "cpu_model_name")},/g' /root/Xpenology_backup/mobile.js sed: -e expression #1, char 91: unterminated `s' command + APPLY_FN + '[' -f /root/Xpenology_backup/admin_center.js ']' + '[' -f /root/Xpenology_backup/mobile.js ']' + cp -Rf /root/Xpenology_backup/admin_center.js /usr/syno/synoman/webman/modules/AdminCenter/ + cp -Rf /root/Xpenology_backup/mobile.js /usr/syno/synoman/mobile/ui/ + '[' 6 -eq 6 ']' + '[' 1 -ge 2 ']' + rm -rf /root/Xpenology_backup/admin_center.js + rm -rf /root/Xpenology_backup/mobile.js + COMMENT09_FN + echo -e 'The operation is complete!! It takes about 1-2 minutes to reflect, \n(Please refresh the DSM page with F5 or after logout/login and check the information.)' The operation is complete!! It takes about 1-2 minutes to reflect, (Please refresh the DSM page with F5 or after logout/login and check the information.) + exit 0 ash-4.3# Edited July 15, 2019 by Polanskiman Added spoiler tag. 1 Quote Link to comment Share on other sites More sharing options...
fhocorp Posted December 11, 2018 Share #85 Posted December 11, 2018 So the error part is here : ++ echo 'f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";' + cpu_info='f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";' + sed -i 's/f.model]);/f.model]);f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";/g' /root/Xpenology_backup/admin_center.js sed: -e expression #1, char 37: unterminated `s' command ++ echo '{name: "cpu_series",renderer: function(value){var cpu_vendor=" Intel";var cpu_family=" Xeon";var cpu_series=" E5440";var cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";return Ext.String.format('\''{0} {1} {2} [ {3} ]'\'', cpu_vendor, cpu_family, cpu_series, cpu_cores);},label: _T("status", "cpu_model_name")},' + cpu_info_m='{name: "cpu_series",renderer: function(value){var cpu_vendor=" Intel";var cpu_family=" Xeon";var cpu_series=" E5440";var cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";return Ext.String.format('\''{0} {1} {2} [ {3} ]'\'', cpu_vendor, cpu_family, cpu_series, cpu_cores);},label: _T("status", "cpu_model_name")},' + sed -i 's/"ds_model")},/"ds_model")},{name: "cpu_series",renderer: function(value){var cpu_vendor=" Intel";var cpu_family=" Xeon";var cpu_series=" E5440";var cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";return Ext.String.format('\''{0} {1} {2} [ {3} ]'\'', cpu_vendor, cpu_family, cpu_series, cpu_cores);},label: _T("status", "cpu_model_name")},/g' /root/Xpenology_backup/mobile.js sed: -e expression #1, char 91: unterminated `s' command Nice to hear from you soon Best Regards 1 Quote Link to comment Share on other sites More sharing options...
gericb Posted December 11, 2018 Share #86 Posted December 11, 2018 13 hours ago, FOXBI said: I have made some parts of the old version of ch_cpuinfo that allow me to cope with the problem and some problems may arise. It is also a good idea to proceed after restoring the original with No. 3 restores. If you want to know more exactly where the error is, go to sh -x ch_cpuinfo.sh and show me the error detected part. Thank you Curious...have you by chance, included in your code, the "original" DSM Model Name, CPU, CPU Clock Rate, CPU Cores in your code, for the "3) Restore" function, so that it's possible to overwrite flawed data with the factory original version? 1 Quote Link to comment Share on other sites More sharing options...
sd2d Posted December 11, 2018 Share #87 Posted December 11, 2018 yep! all is ok! Thanks FOSBI! 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 12, 2018 Author Share #88 Posted December 12, 2018 9 hours ago, gericb said: Curious...have you by chance, included in your code, the "original" DSM Model Name, CPU, CPU Clock Rate, CPU Cores in your code, for the "3) Restore" function, so that it's possible to overwrite flawed data with the factory original version? no, That does not mean that. While upgrading ch_cpuinfo from 1.0 to 5.0. Collection methods, results, etc. have been changed. That's why I've been struggling to minimize problems that could occur when using previous ch_cpuinfo users. The "RERUN_FN" function is the function that contains the process of modifying the modified file again. In this process, all users have the same DSM environment, so there is a possibility of errors. I hope I have answered your question correctly. English is too hard Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 12, 2018 Author Share #89 Posted December 12, 2018 (edited) 16 hours ago, fhocorp said: + cpu_vendor=' Intel' + '[' ' Intel' == AMD ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ awk '{print $3}' ++ sed s/CPU//g ++ sed 's/(.)//g' ++ sort -u ++ grep -v Not + cpu_family=' Xeon' There is no abnormality in particular. But, Is there a way to change the line when pasting it like this? Or does it look like the terminal window has changed lines or lines? admin_center.js file copy to admin_center.js_bak Try typing in the terminal to see if there are any errors # sed -i 's/f.model]);/f.model]);f.cpu_vendor="Intel";f.cpu_family="Xeon";f.cpu_series="E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";/g' /tmp/admin_center.js_bak If you do not get an error, ch_cpuinfo.sh may have been blanked or wrapped in the process of moving it to your DSM. Please run it and let me know the result. Edited December 12, 2018 by FOXBI some edited comment Quote Link to comment Share on other sites More sharing options...
fhocorp Posted December 12, 2018 Share #90 Posted December 12, 2018 Hello I have run the send command and no errors displayed. I have also relunched ch_cpuinfo : DSM CPU Information Change Tool ver. 5.2 - made by FOXBI Your version of DSM is DSM 6.1 continue... 1) First run 2) Redo 3) Restore - Select Number : 2 Do you want to proceed again? Restore to original file backup and proceed.(Cancel : q) [y/n] : y You have verified and installed the previous version. Contiue... Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : y Restore to source and continue. sed: -e expression #1, char 37: unterminated `s' command sed: -e expression #1, char 91: unterminated `s' command The operation is complete!! It takes about 1-2 minutes to reflect, (Please refresh the DSM page with F5 or after logout/login and check the information.) ash-4.3# Nothing changed.... 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 13, 2018 Author Share #91 Posted December 13, 2018 16 hours ago, fhocorp said: Nothing changed.... If there was no error when executing a separate command, the code is correct. Does it work as a binary file and the result is the same? One more let me know. Quote Link to comment Share on other sites More sharing options...
fhocorp Posted December 13, 2018 Share #92 Posted December 13, 2018 Il y a 7 heures, FOXBI a dit : If there was no error when executing a separate command, the code is correct. Does it work as a binary file and the result is the same? One more let me know. Using both the binary file and the bash script the errors are displayed. ☹️ 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 13, 2018 Author Share #93 Posted December 13, 2018 6 hours ago, fhocorp said: Using both the binary file and the bash script the errors are displayed. ☹️ Thank you for your confirmation. There seems to be more problems than I thought. I think I should open the js file and check it myself. Could you attach a file? I'd like to show you both backed up and original files. Quote Link to comment Share on other sites More sharing options...
fhocorp Posted December 14, 2018 Share #94 Posted December 14, 2018 Il y a 19 heures, FOXBI a dit : Thank you for your confirmation. There seems to be more problems than I thought. I think I should open the js file and check it myself. Could you attach a file? I'd like to show you both backed up and original files. ok Please find my current admin_center.js file in the attachements. Best Regards admin_center.zip 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 14, 2018 Author Share #95 Posted December 14, 2018 On 12/14/2018 at 5:22 PM, fhocorp said: ok Please find my current admin_center.js file in the attachements. Thank you. Your "admin_center.js" file is not problem. I think that one thing that I mentioned before is the cause. It seems that line wrapping is still inserted in the process of collecting information and putting it into a variable. Your GATHER_FN function Spoiler + GATHER_FN + '[' -f /sbin/dmidecode ']' ++ dmidecode ++ grep SMBIOS ++ egrep 'NO|sorry' ++ wc -l + DMI_CHK=0 + '[' 0 -gt 0 ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ grep -v Not ++ sed s/CPU//g ++ awk '{print $2}' ++ sed 's/(.)//g' ++ sed 's/(..)//g' ++ sort -u + cpu_vendor=' Intel' + '[' ' Intel' == AMD ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ grep -v Not ++ awk '{print $3}' ++ sed 's/(.)//g' ++ sed s/CPU//g ++ sort -u + cpu_family=' Xeon' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ sed 's/(..)//g' ++ sed s/CPU//g ++ sed 's/(.)//g' ++ awk '{ if (index($5,"@")!=0) { print $4 } else { print $4" "$5 } }' ++ grep -v Not ++ sort -u + cpu_series=' E5440' ++ cat /proc/cpuinfo ++ grep '^physical id' ++ sort -u ++ wc -l + PICNT=1 ++ cat /proc/cpuinfo ++ grep '^core id' ++ sort -u ++ wc -l + CICNT=4 ++ cat /proc/cpuinfo ++ grep '^cpu cores' ++ sort -u ++ awk '{print $NF}' + CCCNT=4 ++ cat /proc/cpuinfo ++ grep '^siblings' ++ sort -u ++ awk '{print $NF}' + CSCNT=4 ++ cat /proc/cpuinfo ++ grep '^processor' ++ wc -l + THCNT=4 ++ cat /proc/cpuinfo ++ grep processor ++ wc -l + ODCNT=4 + '[' 4 -gt 0 ']' + '[' 1 == 0 ']' + '[' 1 -gt 1 ']' + TPCNT='1 CPU' + TCCNT=4 + '[' 4 -gt 1 ']' + TCCNT='4 Cores ' + '[' 4 -gt 1 ']' + PCCNT='\/4 Cores ' + '[' 4 -gt 1 ']' + TTCNT='4 Threads' + cpu_cores='4 Cores (1 CPU\/4 Cores | 4 Threads)' My GATHER_FN function Spoiler + GATHER_FN + '[' -f /sbin/dmidecode ']' ++ dmidecode ++ grep SMBIOS ++ egrep 'NO|sorry' ++ wc -l + DMI_CHK=0 + '[' 0 -gt 0 ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ grep -v Not ++ sed 's/(.)//g' ++ awk '{print $2}' ++ sed s/CPU//g ++ sed 's/(..)//g' ++ sort -u + cpu_vendor=Intel + '[' Intel == AMD ']' ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ grep -v Not ++ sed 's/(..)//g' ++ awk '{print $3}' ++ sed s/CPU//g ++ sort -u ++ sed 's/(.)//g' + cpu_family=Xeon ++ dmidecode -t processor ++ grep Version ++ grep -v Unknown ++ grep -v Not ++ sort -u ++ sed 's/(..)//g' ++ awk '{ if (index($5,"@")!=0) { print $4 } else { print $4" "$5 } }' ++ sed s/CPU//g ++ sed 's/(.)//g' + cpu_series='E3-1230 V2' ++ cat /proc/cpuinfo ++ grep '^physical id' ++ sort -u ++ wc -l + PICNT=1 ++ cat /proc/cpuinfo ++ grep '^core id' ++ sort -u ++ wc -l + CICNT=8 ++ cat /proc/cpuinfo ++ grep '^cpu cores' ++ sort -u ++ awk '{print $NF}' + CCCNT=8 ++ cat /proc/cpuinfo ++ grep '^siblings' ++ sort -u ++ awk '{print $NF}' + CSCNT=8 ++ cat /proc/cpuinfo ++ grep '^processor' ++ wc -l + THCNT=8 ++ cat /proc/cpuinfo ++ grep processor ++ wc -l + ODCNT=8 + '[' 8 -gt 0 ']' + '[' 1 == 0 ']' + '[' 1 -gt 1 ']' + TPCNT='1 CPU' + TCCNT=8 + '[' 8 -gt 1 ']' + TCCNT='8 Cores ' + '[' 8 -gt 1 ']' + PCCNT='\/8 Cores ' + '[' 8 -gt 1 ']' + TTCNT='8 Threads' + cpu_cores='8 Cores (1 CPU\/8 Cores | 8 Threads)' Please compare. Collected CPU information is entered into the line without entering the variables thoroughly. + cpu_vendor=' Intel' + cpu_family=' Xeon' + cpu_series=' E5440' The variables of the collected information are continuously changed and displayed. + cpu_info='f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";' + sed -i 's/f.model]);/f.model]);f.cpu_vendor=" Intel";f.cpu_family=" Xeon";f.cpu_series=" E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";/g' /root/Xpenology_backup/admin_center.js sed: -e expression #1, char 37: unterminated `s' command This is correct. + cpu_info='f.cpu_vendor="Intel";f.cpu_family="Xeon";f.cpu_series="E3-1230 V2";f.cpu_cores="8 Cores (1 CPU\/8 Cores | 8 Threads)";' + sed -i 's/f.model]);/f.model]);f.cpu_vendor="Intel";f.cpu_family="Xeon";f.cpu_series="E3-1230 V2";f.cpu_cores="8 Cores (1 CPU\/8 Cores | 8 Threads)";/g' /root/Xpenology_backup/admin_center.js Why the space is in the GATHER_FN function should be checked one line at a time. To find out why. in the GATHER_FN function's should be checked one line, one line...by command. I am sorry that I can not solve it right now. Quote Link to comment Share on other sites More sharing options...
fhocorp Posted December 14, 2018 Share #96 Posted December 14, 2018 (edited) Tried to adapt the sed command for my CPU : sed -i 's/f.model]);/f.model]);f.cpu_vendor="Intel";f.cpu_family="Xeon";f.cpu_series="E5440";f.cpu_cores="4 Cores (1 CPU\/4 Cores | 4 Threads)";/g' /tmpRoot/admin_center.js cp /tmpRoot/admin_center.js /usr/syno/synoman/webman/modules/AdminCenter/admin_center.js And it works : Edited December 14, 2018 by fhocorp 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 14, 2018 Author Share #97 Posted December 14, 2018 1 hour ago, fhocorp said: Tried to adapt the sed command for my CPU Good job You did well. It is important to change the information and not worry about poor tools. You had a lot of efforts to try various things. Thank you. Quote Link to comment Share on other sites More sharing options...
sd2d Posted December 15, 2018 Share #98 Posted December 15, 2018 Hey, FOXBI, maybe you can fix this issue by your method? My LSI MR9240-8i can't get SMART status from HDDs. 1 Quote Link to comment Share on other sites More sharing options...
sd2d Posted December 15, 2018 Share #99 Posted December 15, 2018 Spoiler Your version of DSM is DSM 6.2 continue... 1) First run 2) Redo 3) Restore - Select Number : 2 Do you want to proceed again? Restore to original file backup and proceed.(Cancel : q) [y/n] : y You have verified and installed the previous version. Contiue... Auto Excute, If you select n, proceed interactively (Cancel : q) [y/n] : y Restore to source and continue. sed: -e expression #1, char 37: unterminated `s' command sed: -e expression #1, char 91: unterminated `s' command The operation is complete!! It takes about 1-2 minutes to reflect, (Please refresh the DSM page with F5 or after logout/login and check the information.) -ash: DSM: command not found Not working on my second server... 1 Quote Link to comment Share on other sites More sharing options...
FOXBI Posted December 16, 2018 Author Share #100 Posted December 16, 2018 On 12/16/2018 at 2:04 AM, sd2d said: sed: -e expression #1, char 37: unterminated `s' command sed: -e expression #1, char 91: unterminated `s' command The operation is complete!! It takes about 1-2 minutes to reflect, (Please refresh the DSM page with F5 or after logout/login and check the information.) -ash: DSM: command not found Maybe you should comment on the result of `sh -x ch_cpuinfo.sh` 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.