1.10. 时间值(Time Values)

1.10. 时间值(Time Values)
长期以来,UNIX系统一直使用两种不同的时间值:
(1)日历时间(calendar time)。该值是自1970年1月1日00:00:00以来国际标准时间(Coordinated Universal Time (UTC))所经过的秒数累计值(早期的手册称UTC为格林尼治标准时间)。这些时间值可用于记录文件最近一次的修改时间等。
(2)进程时间(Process time)。也被称为CPU时间(CPU time),用以度量一个进程使用的CUP资源。进程时间以时钟滴答(clock ticks)计算,多年来,每秒钟取为50、60或100个滴答。

基本系统数据类型(primitive system data type)clock_t保存这些时间值。(在section2.5.4,我们将说明如何用sysconf函数获得每秒时钟滴答数(number of clock ticks per second))

当我们度量一个进程的执行时间时,在section3.9,我们将看到UNIX系统为一个进程保存三个时间值:
• 时钟时间(clock time)
• 用户CPU时间(user CPU time)
• 系统CPU时间(System CPU time)


时钟时间又称为墙上时钟时间(wall clock time)。它是进程运行的时间总量,其值与系统中同时运行的其它进程数有关。无论何时我们报告时钟时间,都是系统中没有其他活动时的度量。(Whenever we report the clock time, the measurements are made with no other activities on the system.)

用户CPU时间是执行用户指令(user instructions)所用的CPU时间量。

系统CPU时间是CPU time attributed to the kernel when it executes on behalf of the process。例如,无论何时一个进程执行一个系统服务,例如read或write,则在kernel内执行该服务所花费的时间就计入该进程的系统CPU时间。

用户CPU时间和系统CPU时间的和常被称为CPU时间。


要度量任一进程的时钟时间、用户时间和系统时间很容易:只要执行命令命令time(1),其参数是要度量其执行时间的命令,例如:
$ cd /usr/include
$ time -p grep _POSIX_SOURCE */*.h > /dev/null

real    0m0.81s
user    0m0.11s
sys     0m0.07s
time命令的输出格式与所使用的shell有关,因为一些shell不运行/usr/bin/time,but instead have a separate built-in function to measure the time it takes commands to run。
在section8.16,我们将看到一个正在运行的进程如何或得这三个时间。关于时间和日期的一般说明section6.10。


看下这个报错 Started by user Devops CRD Running in Durability level: MAX_SURVIVABILITY [Pipeline] Start of Pipeline [Pipeline] echo Original Release Version: 3 [Pipeline] node Running on Jenkins in /root/.jenkins/workspace/video-analysis-algorithm-pipeline [Pipeline] { [Pipeline] withEnv [Pipeline] { [Pipeline] timestamps [Pipeline] { [Pipeline] stage [Pipeline] { (Sync Up Release) [Pipeline] echo 19:14:57 Sync up video-analysis-algorithm release ... [Pipeline] script [Pipeline] { [Pipeline] echo 19:14:57 CLOUD:azure [Pipeline] echo 19:14:57 Major Deploy Version: 1.10.22 [Pipeline] sh 19:14:57 + helm3 registry login prdtplinkhelmchartzau1.azurecr.io -u bee8c203-08f1-4e0c-9799-a729a7fbfdd7 -p xWy8Q~Kdn~7ayTJL54lMJmyOdmiJVYc8zUksvaE2 19:14:57 WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config 19:14:57 WARNING: Using --password via the CLI is insecure. Use --password-stdin. 19:15:00 Login Succeeded [Pipeline] sh 19:15:00 + helm3 show chart oci://prdtplinkhelmchartzau1.azurecr.io/video-analysis-algorithm --version 1.10.22 19:15:00 WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config [Pipeline] sh 19:15:03 + cat ./temp 19:15:03 + grep appVersion 19:15:03 + head -1 19:15:03 + cut -d : -f 2 [Pipeline] echo 19:15:03 RELEASE_VERSION: 1.10.22 [Pipeline] echo 19:15:03 Latest Release Version: 1.10.22 [Pipeline] } [Pipeline] // script [Pipeline] echo 19:15:03 Creating build directories ... [Pipeline] sh 19:15:03 + mkdir ./build-3 [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Authorization) Stage "Authorization" skipped due to when conditional [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Promote Stage) [Pipeline] input 19:15:03 Promote to azure.uat-v2.azure-brazil-1? 19:15:03 Proceed or Abort 19:15:10 Approved by Devops CRD [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy Stage) [Pipeline] echo 19:15:11 Deploying video-analysis-algorithm Release v1.10.22 to azure.uat-v2.azure-brazil-1 ... [Pipeline] dir 19:15:11 Running in /root/.jenkins/workspace/video-analysis-algorithm-pipeline/build-3 [Pipeline] { [Pipeline] script [Pipeline] { [Pipeline] sh 19:15:11 + git ls-remote ssh://cicdtplinknbu@pdgerrit.tp-link.com:29418/tplinknbu/devops_cicd feature/20251110-tapocare-ai 19:15:11 + cut -f1 [Pipeline] echo 19:15:11 commit id: 2706169fa15101f001dfd146d48f61f657c8d7ef [Pipeline] sh 19:15:11 + rm -rf devops_cicd 19:15:11 + mkdir devops_cicd [Pipeline] sh 19:15:11 + git clone --depth 1 -b feature/20251110-tapocare-ai ssh://cicdtplinknbu@pdgerrit.tp-link.com:29418/tplinknbu/devops_cicd 19:15:11 Cloning into 'devops_cicd'... 19:15:13 Total 26483 (delta 8660), reused 21568 (delta 8660) 19:15:15 Updating files: 79% (15074/18954) Updating files: 80% (15164/18954) Updating files: 81% (15353/18954) Updating files: 82% (15543/18954) Updating files: 83% (15732/18954) Updating files: 84% (15922/18954) Updating files: 85% (16111/18954) Updating files: 86% (16301/18954) Updating files: 87% (16490/18954) Updating files: 88% (16680/18954) Updating files: 89% (16870/18954) Updating files: 90% (17059/18954) Updating files: 91% (17249/18954) Updating files: 92% (17438/18954) Updating files: 93% (17628/18954) Updating files: 94% (17817/18954) Updating files: 95% (18007/18954) Updating files: 96% (18196/18954) Updating files: 97% (18386/18954) Updating files: 98% (18575/18954) Updating files: 99% (18765/18954) Updating files: 100% (18954/18954) Updating files: 100% (18954/18954), done. [Pipeline] sh 19:15:15 + rm -rf k8s-values 19:15:15 + mkdir k8s-values [Pipeline] sh 19:15:15 + cp -rf ./devops_cicd/k8s-values/video-analysis-algorithm ./k8s-values/ [Pipeline] sh 19:15:15 + rm -rf ./devops_cicd [Pipeline] echo 19:15:16 ENV_FOLDER_NAME:azure-pet [Pipeline] echo 19:15:16 deploy() begins... [Pipeline] sh 19:15:16 + yq read ./k8s-values/video-analysis-algorithm/azure-pet/azure-brazil-1/values.yaml app.namespace [Pipeline] sh 19:15:16 + kubectl get deployment -n pet-app-ipc --context azure.uat-v2.azure-brazil-1 19:15:18 No resources found. [Pipeline] sh 19:15:18 + grep -E video-analysis-algorithm-[0-9]+(\.[0-9,a-z,A-Z]+)+(-[a-z,A-Z]+)* 19:15:18 + cat ./temp 19:15:18 + cut -d -f 1 [Pipeline] echo 19:15:18 PREVIOUS_DEPLOY: [Pipeline] echo 19:15:18 azure-pet PREVIOUS_VER: [Pipeline] echo 19:15:18 Deploying to azure-pet: azure-brazil-1 [Pipeline] sh 19:15:19 + [ -d ./k8s-values/video-analysis-algorithm/azure-pet ] 19:15:19 + echo true [Pipeline] sh 19:15:19 + [ -d ./k8s-values/video-analysis-algorithm/global ] 19:15:19 + echo true [Pipeline] sh 19:15:19 + [ -d ./k8s-values/video-analysis-algorithm/azure-pet/common ] 19:15:19 + echo true [Pipeline] sh 19:15:20 + [ -d ./k8s-values/video-analysis-algorithm/azure-pet/azure-brazil-1/config ] 19:15:20 + echo true [Pipeline] sh 19:15:20 + kubectl create configmap video-analysis-algorithm-azure-pet-azure-brazil-1-tmp-config --from-file=./k8s-values/video-analysis-algorithm/global --from-file=./k8s-values/video-analysis-algorithm/azure-pet/common --from-file=./k8s-values/video-analysis-algorithm/azure-pet/azure-brazil-1/config --dry-run -o=yaml [Pipeline] sh 19:15:20 + yq read video-analysis-algorithm-azure-pet-azure-brazil-1-tmp.yaml data [Pipeline] sh 19:15:20 + yq prefix -i video-analysis-algorithm-azure-pet-azure-brazil-1-config-map-data.yaml configMap.data [Pipeline] sh 19:15:21 + [ -d ./k8s-values/video-analysis-algorithm/azure-pet/azure-brazil-1 ] 19:15:21 + echo true [Pipeline] sh 19:15:21 + echo NEW_RELEASE_NAME video-analysis-algorithm-1.10.22 19:15:21 NEW_RELEASE_NAME video-analysis-algorithm-1.10.22 [Pipeline] sh 19:15:21 + helm list --namespace pet-app-ipc --kube-context azure.uat-v2.azure-brazil-1 [Pipeline] sh 19:15:23 + cat ./temp 19:15:23 + grep video-analysis-algorithm 19:15:23 + head -1 19:15:23 + cut -f 1 [Pipeline] sh 19:15:24 + echo networking init 19:15:24 networking init [Pipeline] sh 19:15:24 + kubectl apply -f ./k8s-values/video-analysis-algorithm/azure-pet/azure-brazil-1/networking/service.yaml --context azure.uat-v2.azure-brazil-1 19:15:27 service/video-analysis-algorithm-zbr1 created [Pipeline] sh 19:15:27 + kubectl apply -f ./k8s-values/video-analysis-algorithm/azure-pet/azure-brazil-1/networking/istio.yaml --context azure.uat-v2.azure-brazil-1 19:15:30 gateway.networking.istio.io/video-analysis-algorithm-zbr1-gw created 19:15:32 virtualservice.networking.istio.io/video-analysis-algorithm-zbr1-vs created 19:15:32 virtualservice.networking.istio.io/video-analysis-algorithm-internal-zbr1-vs created 19:15:33 gateway.networking.istio.io/video-analysis-algorithm-internal-grpc-zbr1-gw created 19:15:34 virtualservice.networking.istio.io/video-analysis-algorithm-internal-grpc-zbr1-vs created [Pipeline] sh 19:15:34 + echo networking init successfully 19:15:34 networking init successfully [Pipeline] sh 19:15:34 + echo networking init successfully 19:15:34 networking init successfully [Pipeline] sh 19:15:35 + AWS_DEFAULT_REGION=ap-southeast-1 AWS_PROFILE=uat helm3 upgrade --install video-analysis-algorithm-1.10.22 oci://prdtplinkhelmchartzau1.azurecr.io/video-analysis-algorithm --version 1.10.22 --values ./k8s-values/video-analysis-algorithm/azure-pet/azure-brazil-1/values.yaml --values video-analysis-algorithm-azure-pet-azure-brazil-1-config-map-data.yaml --namespace pet-app-ipc --kube-context azure.uat-v2.azure-brazil-1 --timeout 1200s --wait 19:15:35 WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config 19:15:37 Release "video-analysis-algorithm-1.10.22" does not exist. Installing it now. 19:15:51 W1117 19:15:51.108993 2395101 warnings.go:70] metadata.name: this is used in Pod names and hostnames, which can result in surprising behavior; a DNS label is recommended: [must not contain dots] 19:35:58 Error: Get "https://uat-k8s-nbu-zbr1-dns-3wzszvat.hcp.brazilsouth.azmk8s.io:443/apis/apps/v1/namespaces/pet-app-ipc/deployments/video-analysis-algorithm-1.10.22": context deadline exceeded [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Blue-Green Release) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] stage [Pipeline] { (Promote To BLUE-GREEN-ALL) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy To BLUE-GREEN-ALL) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (SCALE-DOWN-BLUE) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Promote To BLUE-GREEN-END) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy To BLUE-GREEN-END) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Test stage) Stage "Test stage" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE
最新发布
11-18
新版高血压下载接口 接口描述 新版高血压下载接口 URL /api-out/v1/outside/api/hypertensivePatientsServiceNew/queryHypertensivePatientsServiceNewList 请求方式 get 参数名 数据类型 是否必填 说明 checkDate string Y 起始时间 doctorId string N 医生id limit integer(int32) Y 数据条数,最大500 pageNum integer(int32) N 分页数(当查询一批次最大更新时间和上一批次更新一样时,pageNum从1开始) unitId string Y 单位id 返回属性名 类型 说明 1.data array:HypertensivePatientsServiceNewDTO对象 新版高血压随访 1.1.id integer(int32) 主键id 1.2.thirdId string 第三方的id 1.3.residentInfoId integer(int64) 居民id 1.4.inputDoctorId string 录入医生id 1.5.idType integer(int32) *证件类型 1.6.idNo string 证件号码 1.7.residentInfoCode16 string 居民档案编号,16位编码 1.8.areaCode string 地区编码 1.9.visitUnitId string 随访单位id 1.10.teamId integer(int64) 团队id 1.11.unitName string 单位名称 1.12.exectorUUID string 执行人ID, 家签系统医生UUID 1.13.executorName string 执行医生名称 1.14.visitPlace string 随访地点 1.15.residentName string 居民姓名 1.16.valid integer(int32) *有效状态 1.17.dutyUnitId string 随访时居民责任单位 1.18.visitScenePhoto string 随访现场图片(base64编码) 1.19.doctorSign string 医生签名(base64编码) 1.20.peopleSign string 居民签名(base64编码) 1.21.collectMode integer(int32) *采集方式 1.22.visitDate string(date-time) 随访日期 1.23.executorId string 执行人ID, 家签系统医生UUID 1.24.visitMode integer(int32) *随访方式 1.25.nextDate string(date-time) 下次随访日期 1.26.diastolic string 血压 : 舒张压 1.27.constriction string 血压 : 收缩压 1.28.pasthistory string *既往史 1.29.paperReason integer(int32) *采用纸质原因 1.30.paperReasonOther string 采用纸质其他原因 1.31.symptom string *高血压症状 1.32.symptomOther string 症状的其他描述 保留字段 1.33.waistline integer(int32) 腰围(cm) 新增字段 1.34.height integer(int32) 身高 1.35.signWeight integer(int32) 体重(kg) 1.36.smokingStatus string *吸烟情况 1.37.startSmokeAge integer(int32) 从几岁开始吸烟 新增字段 1.38.lastSevendaysSmoke integer(int32) *最近七天是否吸烟 新增字段 1.39.targetWeight integer(int32) 目标体重(kg) 1.40.signBmi string 体质指数(BMI)kg/m2 ) 保留字段 1.41.targetSignBmi string 目标体质指数(BMI)kg/m2 )保留字段 1.42.signHeartRate integer(int32) 心率(次/分钟) 1.43.signOther string 体征检查的其他信息 保留字段 1.44.lifeSmoke string 生活方式指导 :日吸烟量 保留字段 1.45.targetLifeSmoke string 下次随访目标吸烟量 保留字段 1.46.lifeDrink string 生活方式指导 :日饮酒量 保留字段 1.47.targetLifeDrink string 下次随访目标饮酒量 保留字段 1.48.liftMotionNow string 生活方式指导 :运动量,目前运动情况 保留字段 1.49.liftMotionNowEach string 目前运动量,每次 保留字段 1.50.liftMotionNext string 生活方式指导 :运动量,下次运动情况 保留字段 1.51.liftMotionNextEach string 下次运动情况_每次 保留字段 1.52.liftSaltNow integer(int32) *生活方式指导 :摄盐量,当前情况 1.53.liftSaltNext integer(int32) *生活方式指导 :摄盐量,下次情况 1.54.liftPsychological integer(int32) *心理调整 1.55.liftDoctor string *生活方式--遵医行为 1.56.supplementary string *辅助检查 1.57.auxiliaryExamination string 辅助检查 保留字段 1.58.diagResult string *高血压诊断结果 1.59.diagResultOther string 诊断结果其它 1.60.drugCompliance string *服药依从性 1.61.adverseDrugReactions integer(int32) *药物不良反应 1.62.adverseDrugReactionsValue string 药物不良反应, 输入 保留字段 1.63.theServiceCategory string *此次随访分类 1.64.referralTime string 转诊日期 1.65.referral string *转诊 1.66.reasonOther string 转诊原因其他 1.67.reason string *转诊原因 1.68.referralHospitalDepartment string 转诊医院以及科室 1.69.isStartSmokeAge integer(int32) *是否需要保存开始抽烟的年龄 1.70.firstVisit integer(int32) *是否初诊 1.71.typeChildDetail integer(int32) *随访记录类型 1.72.signBloodPressure string 血压 高压#低压 1.73.newComplication string 新发合并症 1.74.serumCreatinineValues1 number 血肌酐1 μmol/L 1.75.serumCreatinineValues2 number 血肌酐1 μmol/L 1.76.createtime string(date-time) 创建时间 1.77.updatetime string(date-time) 更新时间 1.78.unitType integer(int32) *是否本单位 1.79.createUserId string 填表医生id 1.80.createUnitId string 填表医生所在单位id 1.81.respDoctorId string 责任医生 1.82.lastExecutorId string 修改医生id 1.83.lastExecutorUnitId string 修改医生所在单位id 1.84.pasthistoryOther string 既往史其他 1.85.hypertensivePatientsChilds array:HypertensiveMedicineNew对象 高血压用药 1.85.1.mainid integer(int64) 访视主表ID 1.85.2.drugid string 药品ID 1.85.3.drug string 药品名称 1.85.4.createUserId string 填表医生id 1.85.5.drugUsage integer(int32) *药品用法 1.85.6.respDoctorId string 责任医生 1.85.7.usageUnit integer(int32) *剂量单位 1.85.8.dose integer(int32) 剂量 1.85.9.lastExecutorId string 修改医生id 1.85.10.createUnitId string 填表医生所在单位id 1.85.11.isCurrUseDrugs integer(int32) *是否是目前用药 1.85.12.lastExecutorUnitId string 修改医生所在单位id 1.85.13.medicalAgency integer(int32) *取药机构 1.85.14.frequency integer(int32) *用药频次 1.85.15.recordWay integer(int32) *录入方式 1.85.16.compliance integer(int32) *依从性 1.85.17.noComplianceReason string *不依从原因 1.85.18.noComplianceSideEffect string *出现的副作用 1.85.19.noComplianceSideEffectOther string 副作用原因选则其他时的输入的内容 1.86.hypertensivePatientsNewComplications array:HypertensivePatientsNewComplication对象 高血压新发合并症 1.86.1.mainid integer(int64) 访视主表ID 1.86.2.newComplicationTime string 新发合并症发现时间 1.86.3.newComplication integer(int32) *新发合并症 1.86.4.createUserId string 填表医生id 1.86.5.respDoctorId string 责任医生 1.86.6.lastExecutorId string 修改医生id 1.86.7.createUnitId string 填表医生所在单位id 1.86.8.lastExecutorUnitId string 修改医生所在单位id 2.code integer(int32) 返回编码 500:失败,200:成功 3.msg string 返回信息
06-07
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值